cuda.bindings._v2.driver.device_can_access_peer#

cuda.bindings._v2.driver.device_can_access_peer(int dev, int peer_dev) → int#

Queries if a device may directly access a peer device’s memory.

Returns in *can_access_peer a value of 1 if contexts on dev are capable of directly accessing memory from contexts on peer_dev and 0 otherwise. If direct access of peer_dev from dev is possible, then access may be enabled on two specific contexts by calling ctx_enable_peer_access().

Parameters:
  • dev (int) – Device from which allocations on peer_dev are to be directly accessed.

  • peer_dev (int) – Device on which the allocations to be directly accessed by dev reside.

Returns:

Returned access capability.

Return type:

int

See also

cuDeviceCanAccessPeer