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 0bdf9e9
Browse filesBrowse the repository at this point in the historyBrowse files
* fix(cuda.core): pickle memory-resource devices by UUID for IPC
A DeviceMemoryResource sent through multiprocessing, and a pickled
VirtualMemoryResource, named their device by ordinal, and the
VirtualMemoryResource also sent its peers as ordinals. Ordinals are per
process, so a receiver with a different CUDA_VISIBLE_DEVICES rebuilt the
resource on the wrong GPU or granted peer access to the wrong GPU.
Send the owner and the peers by UUID and map them back in the receiver
with a new private helper. Raise a clear RuntimeError when no visible
device has the UUID. The tests reverse the device order in the child
through CUDA_VISIBLE_DEVICES and check the imported buffer's device UUID.
Closes#3097
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* fix(cuda.core): mark the IPC reconstructor's handle parameter not None
The check-cython-not-none hook from main requires it on a def parameter
annotated with a cdef class.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* fix(cuda.core): store VirtualMemoryResourceOptions.peers as a tuple
A generator in `peers` was consumed by the first allocation. Later
allocations granted no peer access, and a pickled resource sent no peer
UUIDs, so the receiver mapped the memory without peer access.
`__post_init__` now converts `peers` to a tuple, which also covers
options given as a dict, through `replace()`, or per call to
`modify_allocation()`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(cuda.core): pickle Device by UUID
Device.__reduce__ sent the ordinal, so a process with a different
CUDA_VISIBLE_DEVICES unpickled a different GPU. It now sends the UUID,
and the receiver maps it back with _device_from_uuid(), which raises
RuntimeError when the device is not visible.
Closes#3196.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(cuda.core): say the Device pickle is for one machine; close test resources on every path
- The Device docstring and the release note say the pickled form is for
processes on the same machine (asked on #3196).
- The buffer tests in test_device_uuid.py release their buffers and pools
in finally blocks, so a failed assertion cannot leave an owned pool open
for the next test's leak check (CodeRabbit on #3198).
- The module docstring cites #3196 for the Device requirement.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>
0 commit comments