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
{{ message }}
Repository navigation
Commit 2231df7
Browse filesBrowse the repository at this point in the historyBrowse files
cuda.core: share VirtualMemoryResource buffers between processes
Buffers of a VirtualMemoryResource whose handle_type is "posix_fd" can now
be exported and imported like pool-backed buffers. Buffer.ipc_descriptor
exports every physical allocation that backs a VirtualMemoryBuffer as a
file descriptor, Buffer.from_ipc_descriptor imports the descriptor with a
VirtualMemoryResource of the receiving process, and a buffer or its
descriptor can be sent through multiprocessing directly. A grown buffer
imports as one contiguous range with the same byte layout.
The import reuses MemAllocationHandle: import_mem_allocation_handle wraps
cuMemImportFromShareableHandle in the same box and cuMemRelease deleter as
create_mem_allocation_handle, with the importer's access descriptors.
VirtualMemoryIPCBufferDescriptor carries one IPCAllocationHandle and one
size per allocation and owns the file descriptors; multiprocessing
duplicates them into the receiving process. VirtualMemoryResource pickles
as (device, options), which lets a buffer pickle as (resource, descriptor).
Fabric handles are not shared yet: no available test system reports fabric
support or exposes an IMEX channel, so that path could not be verified.
Part of #2980.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
0 commit comments