Function rcudnn::cudaDeviceGetP2PAttribute[][src]

pub unsafe extern "C" fn cudaDeviceGetP2PAttribute(
    value: *mut i32,
    attr: cudaDeviceP2PAttr,
    srcDevice: i32,
    dstDevice: i32
) -> cudaError
Expand description

\brief Queries attributes of the link between two devices.

Returns in \p *value the value of the requested attribute \p attrib of the link between \p srcDevice and \p dstDevice. The supported attributes are:

  • ::cudaDevP2PAttrPerformanceRank: A relative value indicating the performance of the link between two devices. Lower value means better performance (0 being the value used for most performant link).
  • ::cudaDevP2PAttrAccessSupported: 1 if peer access is enabled.
  • ::cudaDevP2PAttrNativeAtomicSupported: 1 if native atomic operations over the link are supported.
  • ::cudaDevP2PAttrCudaArrayAccessSupported: 1 if accessing CUDA arrays over the link is supported.

Returns ::cudaErrorInvalidDevice if \p srcDevice or \p dstDevice are not valid or if they represent the same device.

Returns ::cudaErrorInvalidValue if \p attrib is not valid or if \p value is a null pointer.

\param value - Returned value of the requested attribute \param attrib - The requested attribute of the link between \p srcDevice and \p dstDevice. \param srcDevice - The source device of the target link. \param dstDevice - The destination device of the target link.

\return ::cudaSuccess, ::cudaErrorInvalidDevice, ::cudaErrorInvalidValue \notefnerr \note_init_rt \note_callback

\sa ::cudaCtxEnablePeerAccess, ::cudaCtxDisablePeerAccess, ::cudaCtxCanAccessPeer, ::cuDeviceGetP2PAttribute