-
Notifications
You must be signed in to change notification settings - Fork 29
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
Dpctl support for numpy 2.0 in runtime #1735
Conversation
Introduced dpctl.tensor._numpy_helper which imports AxisError, normalize_axis_index, normalize_axis_tuple conditionally based on np.lib.NumpyVersion Changed codebase to import these qualifiers from this new module instead of directly from numpy. Updated pre-commit versions to resolve oddball warning.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.18.0dev0=py310h15de555_109 ran successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that we can relax the upper bound of run numpy dependency for dpctl in meta.yaml
?
Yes, assuming we'd build |
Array API standard conformance tests for dpctl=0.18.0dev0=py310h15de555_110 ran successfully. |
conda-recipe/meta.yaml
Outdated
@@ -34,7 +34,7 @@ requirements: | |||
- wheel | |||
run: | |||
- python | |||
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }} | |||
- {{ pin_compatible('numpy', min_pin='x.x') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is still unavailable to install dpctl with numpy 2.0 due to run dependency:
$ mamba search -i dpctl -c /localdisk/work/antonvol/bits/dpctl/channel --override-channels
Loading channels: done
dpctl 0.18.0dev0 py311h15de555_110
----------------------------------
file name : dpctl-0.18.0dev0-py311h15de555_110.tar.bz2
name : dpctl
version : 0.18.0dev0
build : py311h15de555_110
build number: 110
size : 21.6 MB
license : Apache-2.0
subdir : linux-64
url : file:///localdisk/work/antonvol/bits/dpctl/channel/linux-64/dpctl-0.18.0dev0-py311h15de555_110.tar.bz2
md5 : 829d9a7446399b7c36d96cf2789c8653
timestamp : 2024-07-17 12:34:07 UTC
dependencies:
- __glibc >=2.28,<3.0.a0
- dpcpp-cpp-rt >=2024.0
- level-zero
- libgcc-ng >=14
- libstdcxx-ng >=14
- numpy >=1.23,<2.0a0
- numpy >=1.23.5,<2.0a0
- python >=3.11,<3.12.0a0
- python_abi 3.11.* *_cp311
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am building the recipe using conda-forge
channel only which is now possible thanks to work by @ZzEeKkAa to check if the issue is on the dpctl side, or tangled in the metainformation of build-time dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same thing observed when building with conda-forge channel only.
(base) opavlyk@opavlyk-mobl:~/repos/dpctl$ mamba search -c local dpctl=0.18* --info
Loading channels: done
dpctl 0.18.0dev0 py312h498558c_106
----------------------------------
file name : dpctl-0.18.0dev0-py312h498558c_106.tar.bz2
name : dpctl
version : 0.18.0dev0
build : py312h498558c_106
build number: 106
size : 21.5 MB
license : Apache-2.0
subdir : linux-64
url : file:///home/opavlyk/mamba/conda-bld/linux-64/dpctl-0.18.0dev0-py312h498558c_106.tar.bz2
md5 : a41578215faceef29b06565753347b65
timestamp : 2024-07-17 21:44:31 UTC
dependencies:
- __glibc >=2.28,<3.0.a0
- dpcpp-cpp-rt >=2024.0
- dpcpp-cpp-rt >=2024.2.0,<2025.0a0
- level-zero
- libgcc-ng >=14
- libstdcxx-ng >=14
- numpy >=1.26,<2.0a0
- numpy >=1.26.4,<2.0a0
- python >=3.12,<3.13.0a0
- python_abi 3.12.* *_cp312
When building with {{conda build -c conda-forge --python=3.12 --numpy=2.0 --no-test conda-recipe/}} while replacing {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}
with numpy
I get:
(base) opavlyk@opavlyk-mobl:~/repos/dpctl$ mamba search -c local dpctl=0.18* --info
Loading channels: done
dpctl 0.18.0dev0 py312hdf72452_106
----------------------------------
file name : dpctl-0.18.0dev0-py312hdf72452_106.tar.bz2
name : dpctl
version : 0.18.0dev0
build : py312hdf72452_106
build number: 106
size : 21.5 MB
license : Apache-2.0
subdir : linux-64
url : file:///home/opavlyk/mamba/conda-bld/linux-64/dpctl-0.18.0dev0-py312hdf72452_106.tar.bz2
md5 : c7164cb903872e171a3afa55881190a8
timestamp : 2024-07-18 02:26:01 UTC
dependencies:
- __glibc >=2.28,<3.0.a0
- dpcpp-cpp-rt >=2024.0
- dpcpp-cpp-rt >=2024.2.0,<2025.0a0
- level-zero
- libgcc-ng >=14
- libstdcxx-ng >=14
- numpy >=1.19,<3
- python >=3.12,<3.13.0a0
- python_abi 3.12.* *_cp312
I therefore am going to revert the attempted change to solve meta information and defer that to another PR.
7d7d7f0
to
4df7704
Compare
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_130 ran successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @oleksandr-pavlyk, LGTM!
Changes that allow
dpctl
pass tests with NumPy 2.0 in the runtime environment