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 on peer, 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) – The dpctl.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 on peer.

    • "atomics_supported"

      Returns True if it is possible for this device to concurrently access and atomically modify USM device memory on peer when enabled. Atomics must have memory_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 by value is supported between this device and peer, otherwise False.

Return type:

bool

Raises:

TypeError – If peer is not dpctl.SyclDevice.