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(...)) call cuMemPoolGetAccess; writes (add, discard, and bulk ops) call cuMemPoolSetAccess. 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 Device objects. add, discard, and __contains__ accept either a Device or a device-ordinal int; the owner device is silently ignored when supplied.

All bulk operations (update, |=, &=, -=, ^=, clear) issue exactly one cuMemPoolSetAccess call. 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)#
add(self, value) None#

Grant peer access from value to allocations in this pool.

clear(self) None#

Revoke all peer access in a single driver call.

difference_update(self, *others) None#

Revoke peer access for every device in others in one driver call.

discard(self, value) None#

Revoke peer access from value to allocations in this pool.

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.

symmetric_difference_update(
self,
other,
) None#

Toggle peer access for every device in other in one driver call.

update(self, *others) None#

Grant peer access to every device in others in one driver call.