Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with numpy 2.0 #1760

Merged
merged 4 commits into from
Aug 16, 2024
Merged

Build with numpy 2.0 #1760

merged 4 commits into from
Aug 16, 2024

Conversation

oleksandr-pavlyk
Copy link
Collaborator

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

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?

Copy link

github-actions bot commented Jul 25, 2024

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

@coveralls
Copy link
Collaborator

coveralls commented Jul 25, 2024

Coverage Status

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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
Copy link
Contributor

ekomarova commented Jul 29, 2024

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
Copy link
Contributor

ekomarova commented Jul 29, 2024

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
Collaborator 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
Copy link
Contributor

ekomarova commented Jul 29, 2024

@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
Copy link
Contributor

ekomarova commented Jul 31, 2024

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
Contributor

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

@ekomarova
Copy link
Contributor

ekomarova commented Aug 7, 2024

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

@ekomarova
Copy link
Contributor

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
Copy link

github-actions bot commented Aug 9, 2024

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

@ekomarova
Copy link
Contributor

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

Copy link

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

@ekomarova
Copy link
Contributor

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
Copy link

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

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

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
47 of 53 checks passed
@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