cuda.core._memory._peer_access_utils.PeerAccessibleBySetProxy#
- class cuda.core._memory._peer_access_utils.PeerAccessibleBySetProxy(mr)#
Live driver-backed view of the peer devices granted access to a memory pool.
Reads (
__contains__,__iter__,len(...)) callcuMemPoolGetAccess; writes (add,discard, and bulk ops) callcuMemPoolSetAccess. There is no in-memory mirror, so the view always reflects the current driver state and stays consistent across multiple wrappers around the same pool.Iteration yields
Deviceobjects.add,discard, and__contains__accept either aDeviceor a device-ordinalint; the owner device is silently ignored when supplied.All bulk operations (
update,|=,&=,-=,^=,clear) issue exactly onecuMemPoolSetAccesscall. This matters: peer-access transitions can take seconds per pool because every existing memory mapping is updated, so coalescing into a single driver call lets the toolkit handle the mappings in parallel.Methods
- __init__(self, mr)#
- difference_update(self, *others) None#
Revoke peer access for every device in
othersin one driver call.
- intersection_update(self, *others) None#
Restrict peer access to the intersection in a single driver call.
- isdisjoint(other)#
Return True if two sets have a null intersection.
- pop()#
Return the popped value. Raise KeyError if empty.
- remove(value)#
Remove an element. If not a member, raise a KeyError.