![]() |
ONNX Runtime
|
The OrtNodeComputeInfo struct provides functions that an OrtEp implements to specify the compute function for a compiled OrtGraph instance. More...
#include <onnxruntime_ep_c_api.h>
Public Attributes | |
| uint32_t | ort_version_supported |
| The ONNX Runtime version the OrtNodeComputeInfo was compiled with. | |
| OrtStatus *(* | CreateState )(OrtNodeComputeInfo *this_ptr, OrtNodeComputeContext *compute_context, void **compute_state) |
| Creates an opaque compute state object that is then passed to the Compute() function during inference. | |
| OrtStatus *(* | Compute )(OrtNodeComputeInfo *this_ptr, void *compute_state, OrtKernelContext *kernel_context) |
| Computation function called to execute the fused node compiled by an OrtEp instance. | |
| void(* | ReleaseState )(OrtNodeComputeInfo *this_ptr, void *compute_state) |
| Releases the compute state returned by CreateState(). | |
The OrtNodeComputeInfo struct provides functions that an OrtEp implements to specify the compute function for a compiled OrtGraph instance.
| OrtStatus *( * OrtNodeComputeInfo::Compute) (OrtNodeComputeInfo *this_ptr, void *compute_state, OrtKernelContext *kernel_context) |
Computation function called to execute the fused node compiled by an OrtEp instance.
| [in] | this_ptr | The OrtNodeComputeInfo instance. |
| [in] | compute_state | The opaque computation state returned by CreateState(). |
| [in] | kernel_context | The OrtKernelContext instance used to access inputs/outputs. |
| OrtStatus *( * OrtNodeComputeInfo::CreateState) (OrtNodeComputeInfo *this_ptr, OrtNodeComputeContext *compute_context, void **compute_state) |
Creates an opaque compute state object that is then passed to the Compute() function during inference.
| [in] | this_ptr | The OrtNodeComputeInfo instance. |
| [in] | compute_context | OrtNodeComputeContext instance that contains compiled/fused node's name and host memory allocation functions. Can optionally be used to build the compute state. |
| [out] | compute_state | Output parameter that is assigned the opaque computation state. ONNX Runtime calls ReleaseState() (after calling Compute()) to allow the implementer to release the compute state. |
| uint32_t OrtNodeComputeInfo::ort_version_supported |
The ONNX Runtime version the OrtNodeComputeInfo was compiled with.
Implementation should set to ORT_API_VERSION. ORT will use this to ensure it does not call functions that were not available when the EP library was compiled.
| void( * OrtNodeComputeInfo::ReleaseState) (OrtNodeComputeInfo *this_ptr, void *compute_state) |
Releases the compute state returned by CreateState().
| [in] | this_ptr | The OrtNodeComputeInfo instance. |
| [in,out] | compute_state | The opaque compute state returned by CreateState(). |