Fix DeviceNDArray.device_ctypes_pointer to always be ctypes#295
Merged
kkraus14 merged 1 commit intoNVIDIA:mainfrom Jun 13, 2025
Merged
Fix DeviceNDArray.device_ctypes_pointer to always be ctypes#295kkraus14 merged 1 commit intoNVIDIA:mainfrom
DeviceNDArray.device_ctypes_pointer to always be ctypes#295kkraus14 merged 1 commit intoNVIDIA:mainfrom
Conversation
When the NVIDIA bindings are in use, `device_ctypes_pointer` should always be a ctypes pointer, otherwise the interface changes depending on which set of bindings are in use. This has been a long-standing inconsistency, but it needs to be resolved. The fundamental change is only to `DeviceNDArray.device_ctypes_pointer`. The associated changes are all fixups to maintain internal consistency.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test |
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
DeviceNDArray.device_ctypes_pointer to always be ctypesDeviceNDArray.device_ctypes_pointer to always be ctypes
kkraus14
approved these changes
Jun 13, 2025
gmarkall
added a commit
to gmarkall/numba-cuda
that referenced
this pull request
Jun 14, 2025
- NFC: Don't rely on `Dispatcher._compiler` API (NVIDIA#289) - [DOCS] Improve the introduction and installation section of the documentation (NVIDIA#293) - Fix `DeviceNDArray.device_ctypes_pointer` to always be ctypes (NVIDIA#295) - Raise better error when `cuda.bindings` are not available (NVIDIA#294)
Merged
Member
|
LGTM, thx Graham/Keith! |
gmarkall
added a commit
to gmarkall/numba-cuda
that referenced
this pull request
Jul 18, 2025
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (NVIDIA#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (NVIDIA#328) - Fix indexing GPUs with CUdevice object (NVIDIA#319) - Fix bindings: consistency of contexts, streams, and events, similar to NVIDIA#295 (NVIDIA#296) - Fix nvrtc resolution when CUDA_HOME env is set (NVIDIA#314)
Merged
gmarkall
added a commit
that referenced
this pull request
Jul 18, 2025
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (#328) - Fix indexing GPUs with CUdevice object (#319) - Fix bindings: consistency of contexts, streams, and events, similar to #295 (#296) - Fix nvrtc resolution when CUDA_HOME env is set (#314)
atmnp
pushed a commit
to atmnp/numba-cuda
that referenced
this pull request
Jul 21, 2025
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (NVIDIA#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (NVIDIA#328) - Fix indexing GPUs with CUdevice object (NVIDIA#319) - Fix bindings: consistency of contexts, streams, and events, similar to NVIDIA#295 (NVIDIA#296) - Fix nvrtc resolution when CUDA_HOME env is set (NVIDIA#314)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the NVIDIA bindings are in use,
device_ctypes_pointershould always be a ctypes pointer, otherwise the interface changes depending on which set of bindings are in use. This has been a long-standing inconsistency, but it needs to be resolved.The fundamental change is only to
DeviceNDArray.device_ctypes_pointer. The associated changes are all fixups to maintain internal consistency.This likely covers 95% of broken use cases, with the remaining small number being related to streams and events, that are both more involved to fix and less likely to be directly affected by users (because users will mostly not look directly at the stream / event handle).