cuda.core 1.1.0 Release Notes#
Highlights#
cuda.corenow ships with.pyitype stubs for all public APIs, giving IDEs and type checkers full autocompletion and static analysis.New
cuda.core.texturemodule for texture and surface memory:OpaqueArray,MipmappedArray,TextureObject, andSurfaceObject, constructed through the correspondingDevice.create_*factories.Richer managed-memory support: the new
ManagedBufferexposes a property-style advice API (read_mostly,preferred_location,accessed_by) with NUMA-aware host locations via the newHosttype, plus batched range operations incuda.core.utilsfor prefetching and discarding many buffers at once.CUDA 13.3 toolkit support. (#2139)
New features#
Added
Hostas the symmetric counterpart ofDevicefor expressing managed-memory locations:Host()(any host),Host(numa_id=N)(specific NUMA node), andHost.numa_current()(calling thread’s NUMA node). (#1775)Added
ManagedBuffer, aBuffersubclass returned byManagedMemoryResource.allocate()that exposes a property-style advice API:buf.read_mostly(bool) — driver-backed get/set.buf.preferred_location(Device|Host| None) — driver-backed get/set; assigningNoneunsets.buf.accessed_by— a live, set-like view;add()/discard()issue advice, iteration queries the driver.buf.prefetch(location, *, stream),buf.discard(*, stream),buf.discard_prefetch(location, *, stream)— instance methods that delegate to the matching free functions.
Use
ManagedBuffer.from_handle()to wrap an existing managed-memory pointer. (#1775)Added batched managed-memory range operations to
cuda.core.utils(CUDA 13+):prefetch_batch(),discard_batch(), anddiscard_prefetch_batch(). Each takes a sequence of managedBufferinstances and dispatches to the correspondingcuMem*BatchAsyncdriver entry point, addressing the managed-memory portion of #1333. Single-buffer operations are exposed as instance methods onManagedBuffer(prefetch(),discard(),discard_prefetch()) and as property setters (read_mostly,preferred_location,accessed_by). Locations are expressed viaDeviceorHost.Added
system.Device.get_nvlink_count()andsystem.Device.get_nvlinks()for device-specific NVLink enumeration. These APIs avoid relying on the static NVMLNVML_NVLINK_MAX_LINKSmacro when querying the links available on a particular device. (#2192)Added the
graph.GraphBuilder.graph_definitionproperty, which exposes a captured graph as an explicitgraph.GraphDefinitionview sharing ownership of the same underlying graph. This enables hybrid flows that mix the capture and explicit graph-building APIs, such as inspecting or augmenting a captured graph, or populating a conditional body entirely through the explicit API. (#2026)Added the
cuda.core.texturemodule for texture and surface memory:OpaqueArrayandMipmappedArrayfor hardware-laid-out array allocations, andTextureObjectandSurfaceObjectfor bindless kernel-side sampled reads and typed load/store. Objects are constructed from aResourceDescriptorviaDevice.create_opaque_array(),Device.create_mipmapped_array(),Device.create_texture_object(), andDevice.create_surface_object(). (#467, #2095, #2307)cuda.corenow ships with.pyistubs for all public APIs, enabling users’ IDEs and type checkers to provide better autocompletion and static analysis. (#2061)ObjectCodeandProgramnow accept path-like inputs in addition to strings and bytes. (#2123)Exposed a
Buffer.sizeaccessor to Python. (#2068, closes #2049)
Fixes and enhancements#
On WSL,
cuda.core.system.get_process_namewould raise aUnicodeDecodeError. It should now return the correct result. (#2118)Calling
cuda.core.system.get_process_namebefore querying any device’scompute_running_processeswould raise aNvmlNotFoundError. 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 raisesValueErrorfor 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_bynow 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 ofRuntimeErrorwhen a buffer cannot be exported. (#2160)Corrected the
BufferandMemoryResource__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#
Deprecated
system.NvlinkInfo.max_links. Usesystem.Device.get_nvlink_count()orsystem.Device.get_nvlinks()to query NVLink availability for a specific device.