dpctl.SyclDevice.can_access_peer¶
- SyclDevice.can_access_peer(peer, value='access_supported')¶
Returns
True
if this device (self
) can enable peer access to USM device memory onpeer
,False
otherwise.If peer access is supported, it may be enabled by calling
enable_peer_access()
.For details, see DPC++ peer access SYCL extension.
- Parameters:
peer (
dpctl.SyclDevice
) – Thedpctl.SyclDevice
instance to check for peer access by this device.value (str, optional) –
Specifies the kind of peer access being queried.
The supported values are
"access_supported"
Returns
True
if it is possible for this device to enable peer access to USM device memory onpeer
.
"atomics_supported"
Returns
True
if it is possible for this device to concurrently access and atomically modify USM device memory onpeer
when enabled. Atomics must havememory_scope::system
when modifying memory on a peer device.
If
False
is returned, these operations result in undefined behavior.Default:
"access_supported"
- Returns:
True
if the kind of peer access specified byvalue
is supported between this device andpeer
, otherwiseFalse
.- Return type:
- Raises:
TypeError – If
peer
is notdpctl.SyclDevice
.