Repository navigation
Conversation
|
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. |
|
/ok to test |
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Generated preamble imports cuda_bindings_13/cuda/bindings/_internal/*, cuda_bindings_13/cuda/bindings/cycufile.pxd, cuda_bindings_13/cuda/bindings/cydriver.pxd |
Generated bindings move existing Cython imports into preambles or reorder them. Generated content hashes change; the declarations and runtime behavior described in these files remain unchanged. |
cuFile structured-array wrappers cuda_bindings_13/cuda/bindings/cufile.pyx |
IOEvents, PerGpuStats, IOVec, Descr, and IOParams use structured-record arrays, named-field access, and buffer-based pointer access. Indexing returns owner-retaining views. |
Driver structured-array wrappers cuda_bindings_13/cuda/bindings/_v2/driver.pyx, cuda_bindings_13/docs/source/release/13.5.0-notes.rst |
Eight wrappers use structured-record arrays and owner-retaining views. Nested wrappers are created on first property access where applicable. The release note reports 5–30× faster struct-array operations in cufile, nvml, and _v2.driver. |
Suggested labels: enhancement
Suggested reviewers: rwgk
Priority:
Change: Feature
Merge Risk: 
Minimal · up to 58c77
-
This change speeds up wrappers for arrays of CUDA structs while preserving the existing API. No concrete merge-blocking issue remains after review.
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
This brings in generator changes from !597.
The premise here is to stop using
numpy.recarray(which are implemented in Python, not C) for these arrays of structs. To avoid changing the API, certain operations lazily still returnrecarrays, but the most important operations avoid that for a /significantly/ faster implementation.Details
_dataas a plainnumpy.ndarraywith the samenumpy.recorddtype, so NumPy integer keys still returnnumpy.record.recarrayare stillrecarray: struct-typed fields and lists of field names are converted with.view(numpy.recarray)before they are returned.recarray._databy key (_data["field"]) instead of by attribute.ptr/int()get the address through the buffer protocol instead of.ctypes.data. The address is not cached, so it always reflects the current_data.