You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python -m venv .venv_no_mkl
$ source .venv_no_mkl/bin/activate
(.venv_no_mkl) $ pip install numpy
# installed numpy 2.2.5# I also tried numpy==1.26.4 to match the version of the OneMKL numpy. The behaviour was the same
I guess ideally the MKL numpy implementation would mirror the behaviour of non-MKL numpy. Storing the actual data does not seem to be a problem, so maybe the data type of the variable containing the array size can be upgraded to an int64?
Should that not be possible for some reason, I think it would be very helpful to raise a Python error (that would have made our debugging much easier 😁 ). Maybe something like:
ValueError: Array-sizecannotexceed2**31-1elements
or something like that.
Thanks a lot in advance! 🙇 I hope this issue is within the scope of this repository, but I couldn't find a dedicated repo for the MKL numpy implementation.
The text was updated successfully, but these errors were encountered:
Summary
When I try to run numpy functions on arrays with more than 2**31 -1 elements, I get the following error:
To me, this suggests that the size of the numpy array is stored in an int32 variable.
To reproduce
I'm using Python 3.12.2 on Ubuntu 24.04 for all examples shown below.
Behaviour with "regular" (non-MKL) numpy
Desired Behaviour
I guess ideally the MKL numpy implementation would mirror the behaviour of non-MKL numpy. Storing the actual data does not seem to be a problem, so maybe the data type of the variable containing the array size can be upgraded to an int64?
Should that not be possible for some reason, I think it would be very helpful to raise a Python error (that would have made our debugging much easier 😁 ). Maybe something like:
or something like that.
Thanks a lot in advance! 🙇 I hope this issue is within the scope of this repository, but I couldn't find a dedicated repo for the MKL numpy implementation.
The text was updated successfully, but these errors were encountered: