![]() |
ONNX Runtime
|
Base struct for imported external memory 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. | |
| OrtExternalMemoryDescriptor | descriptor |
| External memory descriptor. | |
| void(* | Release )(OrtExternalMemoryHandle *handle) |
| Release callback for this handle. EP sets this to its release function. | |
Base struct for imported external memory handles.
EPs derive from this struct to add EP-specific fields (e.g., CUdeviceptr for CUDA). EP is responsible for creating and releasing instances of the derived type.
Example derived type for CUDA EP:
| OrtExternalMemoryDescriptor OrtExternalMemoryHandle::descriptor |
External memory descriptor.
| const OrtEpDevice* OrtExternalMemoryHandle::ep_device |
EP device that created this handle.
| void( * OrtExternalMemoryHandle::Release) (OrtExternalMemoryHandle *handle) |
Release callback for this handle. EP sets this to its release function.
ORT calls this when ReleaseExternalMemoryHandle is invoked. The EP's callback should cast the handle to its derived type and delete it.
| uint32_t OrtExternalMemoryHandle::version |
Must be ORT_API_VERSION.