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
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Array properties now accept integer handles as well as CUDA array objects.
Bug Fixes
Improved reliability when preparing CUDA structure metadata. Allocation failures are reported clearly, and temporary storage is released safely.
Improvements
Existing metadata layouts and array length validation behavior remain unchanged.
CUDA 12 and CUDA 13 bindings update struct dtype-offset calculations to use zeroed heap allocations with allocation-failure handling and cleanup. Selected setter annotations now accept integers. The changes also update imports, generated-file hashes, and documentation.
Changes: CUDA binding updates
Layer / File(s)
Summary
CUDA 12 dtype offset helpers cuda_bindings_12/cuda/bindings/cufile.pyx, cuda_bindings_12/cuda/bindings/nvml.pyx
The CuFile and NVML dtype helpers calculate offsets from allocated zeroed structs. They raise MemoryError if allocation fails and release temporary storage after dtype construction. NVML docstrings are also reflowed.
CUDA 13 dtype offset helpers cuda_bindings_13/cuda/bindings/_v2/driver.pyx, cuda_bindings_13/cuda/bindings/_v2/nvrtc.pyx, cuda_bindings_13/cuda/bindings/cudla.pyx, cuda_bindings_13/cuda/bindings/cufile.pyx, cuda_bindings_13/cuda/bindings/nvml.pyx
The dtype helpers use the same allocation, failure-handling, and cleanup pattern. Their dtype layouts remain unchanged.
Selected array setters accept integer values in their annotations. _fast_enum.py imports Iterator from collections.abc. Docstrings are reflowed. Generated-file hashes are updated.
Suggested reviewers:rwgk
Change: Bug fix
Merge Risk: Minimal · up to 91e8d
This catch-up regenerates the CUDA 12 and 13 bindings. It makes dtype offset calculation use checked heap allocations, widens a few type hints, and reflows docs. No behavior-affecting problems were identified, so merge risk is minimal.
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — cuda_bindings_13 (service) was modified; 9 changed files map to changed impact.
observed — cuda_bindings_12 (service) was modified; 5 changed files map to changed impact.
Before / after behavior
observed — Modified behavior in cuda_bindings_12/cuda/bindings/cufile.pyx: The generated-file content hash changed.
observed — Modified behavior in cuda_bindings_12/cuda/bindings/cufile.pyx: The _py_anon_pod1 dtype helper now obtains field offsets from a zeroed heap-allocated struct, raises MemoryError on allocation failure, and frees the temporary allocation in finally; previously it calculated offsets from a local struct.
observed — Modified behavior in cuda_bindings_12/cuda/bindings/cufile.pyx: The _py_anon_pod3 dtype helper now derives offsets from a zeroed heap-allocated struct, handles allocation failure with MemoryError, and frees the allocation in finally, replacing offsets based on a local struct.
observed — Modified behavior in cuda_bindings_12/cuda/bindings/cufile.pyx: The CUfileIOEvents_t dtype helper now allocates a zeroed struct to determine field offsets, raises MemoryError if allocation fails, and releases the allocation in finally instead of using a local struct.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
Preview will be ready when the GitHub Pages deployment is complete.
This branch has not been deployed
No deployments
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
cuda.bindingsEverything related to the cuda.bindings moduleenhancementAny code-related improvements
2 participants
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.
Adds generator fixes !617 and !606.