Skip to content

Build with numpy 2.0 - #1760

Merged
oleksandr-pavlyk merged 4 commits into
masterfrom
build-with-numpy-2.0
Aug 16, 2024
Merged

oleksandr-pavlyk merged 4 commits into
masterfrom
build-with-numpy-2.0

Conversation

@oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk commented Jul 25, 2024 •

Copy link
Copy Markdown
Contributor

Build conda packages with NumPy 2.0 in the build environment. The meta.yaml file for dpctl was changed to not use pin_compatible('numpy', min='x.x', max='x') per migration guidelines from conda-forge.

Testing should still pick NumPy 1.26.4 from Intel channel.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@github-actions

github-actions Bot commented Jul 25, 2024 •

Copy link
Copy Markdown

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@coveralls

coveralls commented Jul 25, 2024 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 87.883%. remained the same
when pulling 318d55c on build-with-numpy-2.0
into 52edb6d on master.

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_166 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_167 ran successfully.
Passed: 895
Failed: 0
Skipped: 119

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_173 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_173 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_177 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@oleksandr-pavlyk
oleksandr-pavlyk marked this pull request as ready for review July 29, 2024 02:18
@ekomarova

ekomarova commented Jul 29, 2024 •

Copy link
Copy Markdown
Member

In order for this PR to be built in the internal CI with 2.0, I need to change the mamba build flag to --numpy 2.0.0. I can try to do this and restart the checks

@ekomarova

ekomarova commented Jul 29, 2024 •

Copy link
Copy Markdown
Member

For some reason, the environment still resolved in favor of 1.26.4, even despite --numpy 2.0.0 flag and the absence of any numpy pinning in recipe.. I believe the reason for this is 486637a that deleted numpy from host. For this to work, we need to return numpy to host

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor Author

@ekomarova This PR modified conda-packages.yml workflow file to remove use of Intel channel from the conda build command and only use conda-forge. I just recheck that for both platforms and all version of Python (3.9, 3.10, 3.11, and 3.12) installed numpy 2.0.1 into the build environment.

The test environment continues to use Intel channel and thus 3.9, 3.10, and 3.11 install numpy 1.26.4 into test environment from there, while for Python 3.12 the latest numpy gets installed from conda-forge channel.

@ekomarova

ekomarova commented Jul 29, 2024 •

Copy link
Copy Markdown
Member

@oleksandr-pavlyk
Update: The pinning in the recipe https://github.com/IntelPython/dpctl/blob/master/pyproject.toml#L12 is always a priority compared to --numpy <version>. For --numpy <version> to work as expected, the pinning should not be anywhere in host, as it was previously here 486637a#diff-330610924437ff65867549da646165faa154ae5201567339b33169f521c084b2L33. Current situation in internal CI:

  • strict channel priority -c gold -c conda-forge
  • pinning numpy >= 1.23 in the recipe
  • using --numpy 2.0.0

In the current situation, conda can only solve the environment so that it satisfies the first two conditions. Since numpy 1.26 is available on gold and it satisfies the strict channel priority and pinning in the recipe numpy >=1.23, and --numpy 2.0.0 is no longer important in this case. We had a similar thing when we needed to build with 1.24. It was the situation when there was a pinning in the recipe, and option --numpy was ignored
Example: IntelPython/dpnp#1771

@ekomarova

ekomarova commented Jul 31, 2024 •

Copy link
Copy Markdown
Member

It looks like in order to make this work in internal CI, we need to rebuild numpy from conda-forge with 2025 mkl, otherwise we will get conflicts. We can plan this activity.
Details can be found here: #1770 (comment)

@ekomarova

Copy link
Copy Markdown
Member

Just for information: building numpy 2.0 with conda-forge recipe with 2025 mkl is WIP

@ekomarova

ekomarova commented Aug 7, 2024 •

Copy link
Copy Markdown
Member

Update: We expect a built numpy 2.0 package in the next few days

@ekomarova

Copy link
Copy Markdown
Member

We managed to fix the windows problem. Next, I plan to test this PR with built numpy 2.0, and then add the status

@ekomarova ekomarova closed this Aug 9, 2024
@ekomarova ekomarova reopened this Aug 9, 2024
@github-actions

github-actions Bot commented Aug 9, 2024

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_280 ran successfully.
Passed: 895
Failed: 0
Skipped: 119

@ekomarova

Copy link
Copy Markdown
Member

The package is hosted on a separate channel https://af01p-igk.devtools.intel.com/ui/repos/tree/General/idp-conda-pkgserver-igk-local/numpy, but I can't test this PR yet due to channel problems. As soon as we fix them, I'll restart the checks

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_285 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@ekomarova

Copy link
Copy Markdown
Member

We need to fix something in CI logic in order for the conda build to pass, but in general this PR is now being built with numpy 2.0.1, and tested with 1.26.4 in internal CI

Test examples with Python 3.11
@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_308 ran successfully.
Passed: 894
Failed: 1
Skipped: 119

@ndgrigorian ndgrigorian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think we can merge this.

@oleksandr-pavlyk
oleksandr-pavlyk merged commit 972fdb6 into master Aug 16, 2024
@oleksandr-pavlyk
oleksandr-pavlyk deleted the build-with-numpy-2.0 branch August 16, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants