ONNX Runtime
Loading...
Searching...
No Matches
OrtExternalSemaphoreHandle Struct Reference

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 OrtEpDeviceep_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.
 

Detailed Description

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:

struct MyCudaExternalSemaphoreHandle : OrtExternalSemaphoreHandle {
CUexternalSemaphore ext_semaphore;
};
Base struct for imported external semaphore handles.
Definition onnxruntime_ep_c_api.h:72
Since
Version 1.24.

Member Data Documentation

◆ descriptor

OrtExternalSemaphoreDescriptor OrtExternalSemaphoreHandle::descriptor

External semaphore descriptor.

◆ ep_device

const OrtEpDevice* OrtExternalSemaphoreHandle::ep_device

EP device that created this handle.

◆ Release

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.

◆ version

uint32_t OrtExternalSemaphoreHandle::version

Must be ORT_API_VERSION.