cuda.core 1.4.0 Release Notes#
Fixes and enhancements#
Kernels,
Buffer.fill()and asynchronous copies now work onPinnedMemoryResourcebuffers on every device that supports the pool’s kind of host memory pool, as oncudaMallocHostmemory. Incuda.core1.3.0, only the device that was current when the resource was created could access its buffers. A process that imported the pool, throughPinnedMemoryResource.from_allocation_handle()or by unpickling, granted no device access at all, because pool access is per process. There, kernels failed withCUDA_ERROR_ILLEGAL_ADDRESS,fillfailed withCUDA_ERROR_INVALID_VALUE, and copies silently blocked the host until earlier work on the stream completed. The creating and the importing process now both grant read and write access to every supporting device. (#3415, #3501)Importing the same memory pool more than once in one process, for example by passing a raw file descriptor to
PinnedMemoryResource.from_allocation_handle()twice, no longer breaks the other imports when one of them is closed. The driver returns the same pool for every import, and closing one import used to revoke device access to the pool for all of them, so device access to a pinned pool failed withCUDA_ERROR_INVALID_VALUE. All imports of a pool now share one owner, which revokes access and destroys the pool when the last of them is released. Concurrent imports of the same allocation handle from several threads now return the same memory resource instead of raising an internal error. (#3510)DeviceMemoryResource.from_allocation_handle()now raisesTypeErrorfor the allocation handle of a host memory pool, andPinnedMemoryResource.from_allocation_handle()for the handle of a device memory pool. Unless the memory resource was already registered in the importing process, for example by unpickling it, the import used to succeed and return a resource that misreporteddevice_id,is_host_accessibleandis_device_accessible. Code that imported a pool with the class of the other pool kind must now use the exporting resource’s class. An importedPinnedMemoryResourcenow also reports the pool’s NUMA node asnuma_idinstead of 0. The check and thenuma_idlookup need a CUDA 13 build ofcuda.coreand a 13.2 or later driver; with a CUDA 12 build or an older driver, imports behave as before. (#3502)