pub unsafe extern "C" fn cudaIpcGetEventHandle(
handle: *mut cudaIpcEventHandle_t,
event: cudaEvent_t,
) -> cudaError_tExpand description
Gets an interprocess handle for a previously allocated event.
Takes as input a previously allocated event. This event must have been created with the cudaEventInterprocess and cudaEventDisableTiming flags set. This opaque handle may be copied into other processes and opened with cudaIpcOpenEventHandle to allow efficient hardware synchronization between GPU work in different processes.
After the event has been been opened in the importing process, cudaEventRecord, cudaEventSynchronize, cudaStreamWaitEvent and cudaEventQuery may be used in either process. Performing operations on the imported event after the exported event has been freed with cudaEventDestroy will result in undefined behavior.
IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling cudaDeviceGetAttribute with cudaDeviceAttr::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
handle: Pointer to a user allocated cudaIpcEventHandle in which to return the opaque event handle.event: Event allocated with cudaEventInterprocess and cudaEventDisableTiming flags.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_HANDLEcudaError_t::CUDA_ERROR_OUT_OF_MEMORYcudaError_t::CUDA_ERROR_MAP_FAILEDcudaError_t::CUDA_ERROR_NOT_SUPPORTEDcudaError_t::CUDA_ERROR_INVALID_VALUE
See also: cudaEventCreate, cudaEventDestroy, cudaEventSynchronize, cudaEventQuery, cudaStreamWaitEvent, cudaIpcOpenEventHandle, cudaIpcGetMemHandle, cudaIpcOpenMemHandle, cudaIpcCloseMemHandle, cuIpcGetEventHandle.