cuda.bindings._v2.driver.device_get_p2p_attribute#
- cuda.bindings._v2.driver.device_get_p2p_attribute(
- int attrib,
- int src_device,
- int dst_device,
Queries attributes of the link between two devices.
Returns in
*valuethe value of the requested attributeattribof the link betweensrc_deviceanddst_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_SUPPORTEDP2P: 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 withcuDeviceGetP2PAtomicCapabilities.
Returns
CUDA_ERROR_INVALID_DEVICEifsrc_deviceordst_deviceare not valid or if they represent the same device. ReturnsCUDA_ERROR_INVALID_VALUEifattribis not valid or ifvalueis a null pointer.- Parameters:
attrib (DeviceP2PAttribute) – The requested attribute of the link between
src_deviceanddst_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:
See also
cuDeviceGetP2PAttribute