cuda.core 1.1.0 Release Notes#

Highlights#

  • cuda.core now ships with .pyi type stubs for all public APIs, giving IDEs and type checkers full autocompletion and static analysis.

  • New cuda.core.texture module for texture and surface memory: OpaqueArray, MipmappedArray, TextureObject, and SurfaceObject, constructed through the corresponding Device.create_* factories.

  • Richer managed-memory support: the new ManagedBuffer exposes a property-style advice API (read_mostly, preferred_location, accessed_by) with NUMA-aware host locations via the new Host type, plus batched range operations in cuda.core.utils for prefetching and discarding many buffers at once.

  • CUDA 13.3 toolkit support. (#2139)

New features#

Fixes and enhancements#

  • On WSL, cuda.core.system.get_process_name would raise a UnicodeDecodeError. It should now return the correct result. (#2118)

  • Calling cuda.core.system.get_process_name before querying any device’s compute_running_processes would raise a NvmlNotFoundError. Now it will correctly return the process name, if it is a GPU-using process.

  • system.Device.get_nvlink() now validates link numbers against the device-specific NVLink count and raises ValueError for unsupported links. (#2192)

  • Hardened the IPC buffer import path against malformed or untrusted peer descriptors: descriptor payloads shorter than the driver struct are now rejected before import (#2223), an imported buffer’s size is validated against the mapped allocation extent before any copy (#2224), and negative allocation handles are always rejected, including under -O (#2219).

  • ManagedBuffer.accessed_by now validates every location before issuing any advice, so a bulk assignment containing an invalid entry can no longer leave the applied advice in a torn state. (#2222)

  • Graph nodes now keep their Python-owned attachments (kernel-argument buffers, host-callback functions and user data, and memcpy/memset operands) alive for the lifetime of the graph. Previously, keeping these objects alive was the caller’s responsibility. (#2280)

  • Hardened the graph user-object destructor against races during Python interpreter shutdown. (#2074)

  • Free-threading correctness fixes: buffer and memory-resource threading (#2162), critical-section guards on shared accessors (#2215), and an atomic flag guarding buffer memory-attribute initialization (#2216).

  • Program.compile() cache keys are now FIPS-safe. (#2087)

  • Memory-pool driver errors are now preserved instead of being masked by out-of-memory handling. (#2084)

  • DLPack export now raises BufferError (the intended exception) instead of RuntimeError when a buffer cannot be exported. (#2160)

  • Corrected the Buffer and MemoryResource __eq__ implementations. (#2067, closes #2050)

  • Checkpoint restore now validates GPU UUID inputs early. (#2086)

  • Bumped the PyTorch tensor-bridge upper bound to 2.12. (#2099)

Documentation#

  • Documented the IPC buffer pickle trust boundary: Buffer.__reduce__() and multi-process IPC users should review the security note before unpickling buffer handles from untrusted sources. (#2225)

Deprecated APIs#