inducer / pycuda

CUDA integration for Python, plus shiny features
http://mathema.tician.de/software/pycuda
Other
1.85k stars 288 forks source link

Numpy 2 #451

Closed vincefn closed 3 months ago

vincefn commented 4 months ago

See https://github.com/inducer/pycuda/issues/450

All pycuda tests are passing (with python 12 and numpy 2.0, and cuda 11.8) , except TestDriver.test_register_host_memory which fails with ValueError: Cannot set the NumPy array 'base' dependency more than once

vincefn commented 4 months ago

I added a new commit as I found an issue when accessing a sub-array using a[0,Ø], which overflowed because one of the shape dimensions was an np.int32 and with numpy 2 int+np.int32 returns a np.int32, which can easily overflow...

inducer commented 4 months ago

Thanks! Here's a corresponding PR on Gitlab (with CI): https://gitlab.tiker.net/inducer/pycuda/-/merge_requests/92

vincefn commented 4 months ago

Ok, looking at the CI results

If I read correctly the K40 raw log , there is the failure of TestDriver.test_register_host_memory (expected, see above, not sure if that can be corrected), and the TestGPUArray.test_curand_wrappers_8gb failure with an ECC error which leads to the following device context errors.

The Titan V and X have failures on tests involving texture - cuda 12 issue ?

inducer commented 3 months ago

Finally had a chance to look this over, the changes look good to me. I've skip/xfailed (as appropriate) the failing tests. The ECC failure may well be hardware problem on our end.

inducer commented 3 months ago

(Just waiting to see if anything else pops up on the Gitlab CI.)

inducer commented 3 months ago

This looks good to go. Thanks for working on it. I'll roll a release with these changes.

inducer commented 3 months ago

https://pypi.org/project/pycuda/2024.1.1/

vincefn commented 3 months ago

Thanks for the quick release !