![]() |
ONNX Runtime
|
Base struct for imported external semaphore handles. More...
#include <onnxruntime_ep_c_api.h>
Public Attributes | |
| uint32_t | version |
| Must be ORT_API_VERSION. | |
| const OrtEpDevice * | ep_device |
| EP device that created this handle. | |
| OrtExternalSemaphoreDescriptor | descriptor |
| External semaphore descriptor. | |
| void(* | Release )(OrtExternalSemaphoreHandle *handle) |
| Release callback for this handle. EP sets this to its release function. | |
Base struct for imported external semaphore handles.
EPs derive from this struct to add EP-specific fields (e.g., CUexternalSemaphore for CUDA). EP is responsible for creating and releasing instances of the derived type.
Example derived type for CUDA EP:
| OrtExternalSemaphoreDescriptor OrtExternalSemaphoreHandle::descriptor |
External semaphore descriptor.
| const OrtEpDevice* OrtExternalSemaphoreHandle::ep_device |
EP device that created this handle.
| void( * OrtExternalSemaphoreHandle::Release) (OrtExternalSemaphoreHandle *handle) |
Release callback for this handle. EP sets this to its release function.
ORT calls this when ReleaseExternalSemaphoreHandle is invoked. The EP's callback should cast the handle to its derived type and delete it.
| uint32_t OrtExternalSemaphoreHandle::version |
Must be ORT_API_VERSION.