pub unsafe extern "C" fn cudaDeviceGetNvSciSyncAttributes(
nvSciSyncAttrList: *mut c_void,
device: c_int,
flags: c_int,
) -> cudaError_t
Expand description
\brief Return NvSciSync attributes that this device can support.
Returns in \p nvSciSyncAttrList, the properties of NvSciSync that this CUDA device, \p dev can support. The returned \p nvSciSyncAttrList can be used to create an NvSciSync that matches this device’s capabilities.
If NvSciSyncAttrKey_RequiredPerm field in \p nvSciSyncAttrList is already set this API will return ::cudaErrorInvalidValue.
The applications should set \p nvSciSyncAttrList to a valid NvSciSyncAttrList failing which this API will return ::cudaErrorInvalidHandle.
The \p flags controls how applications intends to use the NvSciSync created from the \p nvSciSyncAttrList. The valid flags are:
- ::cudaNvSciSyncAttrSignal, specifies that the applications intends to signal an NvSciSync on this CUDA device.
- ::cudaNvSciSyncAttrWait, specifies that the applications intends to wait on an NvSciSync on this CUDA device.
At least one of these flags must be set, failing which the API returns ::cudaErrorInvalidValue. Both the flags are orthogonal to one another: a developer may set both these flags that allows to set both wait and signal specific attributes in the same \p nvSciSyncAttrList.
Note that this API updates the input \p nvSciSyncAttrList with values equivalent to the following public attribute key-values: NvSciSyncAttrKey_RequiredPerm is set to
- NvSciSyncAccessPerm_SignalOnly if ::cudaNvSciSyncAttrSignal is set in \p flags.
- NvSciSyncAccessPerm_WaitOnly if ::cudaNvSciSyncAttrWait is set in \p flags.
- NvSciSyncAccessPerm_WaitSignal if both ::cudaNvSciSyncAttrWait and ::cudaNvSciSyncAttrSignal are set in \p flags. NvSciSyncAttrKey_PrimitiveInfo is set to
- NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid \p device.
- NvSciSyncAttrValPrimitiveType_Syncpoint if \p device is a Tegra device.
- NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if \p device is GA10X+. NvSciSyncAttrKey_GpuId is set to the same UUID that is returned in \p cudaDeviceProp.uuid from ::cudaDeviceGetProperties for this \p device.
\param nvSciSyncAttrList - Return NvSciSync attributes supported. \param device - Valid Cuda Device to get NvSciSync attributes for. \param flags - flags describing NvSciSync usage.
\return
::cudaSuccess, ::cudaErrorDeviceUninitialized, ::cudaErrorInvalidValue, ::cudaErrorInvalidHandle, ::cudaErrorInvalidDevice, ::cudaErrorNotSupported, ::cudaErrorMemoryAllocation
\sa ::cudaImportExternalSemaphore, ::cudaDestroyExternalSemaphore, ::cudaSignalExternalSemaphoresAsync, ::cudaWaitExternalSemaphoresAsync