cuda.bindings._v2.driver.device_get_p2p_attribute#

cuda.bindings._v2.driver.device_get_p2p_attribute(
int attrib,
int src_device,
int dst_device,
) → int#

Queries attributes of the link between two devices.

Returns in *value the value of the requested attribute attrib of the link between src_device and dst_device. The supported attributes are:.

  • CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: A relative value indicating the performance of the link between two devices.

  • CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED P2P: 1 if P2P Access is enable.

  • CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: 1 if all CUDA-valid atomic operations over the link are supported.

  • CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: 1 if cudaArray can be accessed over the link.

  • CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED: 1 if some CUDA-valid atomic operations over the link are supported. Information about specific operations can be retrieved with cuDeviceGetP2PAtomicCapabilities.

Returns CUDA_ERROR_INVALID_DEVICE if src_device or dst_device are not valid or if they represent the same device. Returns CUDA_ERROR_INVALID_VALUE if attrib is not valid or if value is a null pointer.

Parameters:
  • attrib (DeviceP2PAttribute) – The requested attribute of the link between src_device and dst_device.

  • src_device (int) – The source device of the target link.

  • dst_device (int) – The destination device of the target link.

Returns:

Returned value of the requested attribute.

Return type:

int

See also

cuDeviceGetP2PAttribute