![]() |
ONNX Runtime
|
Classes | |
struct | OrtAllocator |
Memory allocation interface. More... | |
struct | OrtCUDAProviderOptions |
CUDA Provider Options. More... | |
struct | OrtROCMProviderOptions |
ROCM Provider Options. More... | |
struct | OrtTensorRTProviderOptions |
TensorRT Provider Options. More... | |
struct | OrtMIGraphXProviderOptions |
MIGraphX Provider Options. More... | |
struct | OrtOpenVINOProviderOptions |
OpenVINO Provider Options. More... | |
struct | OrtApiBase |
The helper interface to get the right version of OrtApi. More... | |
struct | OrtCustomHandleType |
struct | OrtApi |
The C API. More... | |
struct | OrtCustomOp |
Macros | |
#define | ORT_API_VERSION 18 |
The API version defined in this header. | |
Functions | |
const OrtApiBase * | OrtGetApiBase (void) |
The Onnxruntime library's entry point to access the C API. | |
OrtStatus * | OrtSessionOptionsAppendExecutionProvider_CUDA (OrtSessionOptions *options, int device_id) |
OrtStatus * | OrtSessionOptionsAppendExecutionProvider_ROCM (OrtSessionOptions *options, int device_id) |
OrtStatus * | OrtSessionOptionsAppendExecutionProvider_MIGraphX (OrtSessionOptions *options, int device_id) |
OrtStatus * | OrtSessionOptionsAppendExecutionProvider_Dnnl (OrtSessionOptions *options, int use_arena) |
OrtStatus * | OrtSessionOptionsAppendExecutionProvider_Tensorrt (OrtSessionOptions *options, int device_id) |
ONNX Runtime C API
#define ORT_API_VERSION 18 |
The API version defined in this header.
This value is used by some API functions to behave as this version of the header expects.
typedef enum ExecutionMode ExecutionMode |
typedef enum GraphOptimizationLevel GraphOptimizationLevel |
Graph optimization level.
Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels for an in-depth understanding of the Graph Optimization Levels.
typedef enum ONNXTensorElementDataType ONNXTensorElementDataType |
Copied from TensorProto::DataType Currently, Ort doesn't support complex64, complex128
typedef struct OrtAllocator OrtAllocator |
Memory allocation interface.
Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators.
When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed.
typedef enum OrtAllocatorType OrtAllocatorType |
typedef struct OrtApiBase OrtApiBase |
typedef struct OrtArenaCfg OrtArenaCfg |
typedef struct OrtCANNProviderOptions OrtCANNProviderOptions |
typedef struct OrtCUDAProviderOptions OrtCUDAProviderOptions |
CUDA Provider Options.
typedef struct OrtCUDAProviderOptionsV2 OrtCUDAProviderOptionsV2 |
typedef enum OrtCudnnConvAlgoSearch OrtCudnnConvAlgoSearch |
Algorithm to use for cuDNN Convolution Op.
typedef OrtCustomThreadHandle(* OrtCustomCreateThreadFn) (void *ort_custom_thread_creation_options, OrtThreadWorkerFn ort_thread_worker_fn, void *ort_worker_fn_param) |
Ort custom thread creation function.
The function should return a thread handle to be used in onnxruntime thread pools Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread
typedef void(* OrtCustomJoinThreadFn) (OrtCustomThreadHandle ort_custom_thread_handle) |
Custom thread join function.
Onnxruntime thread pool destructor will call the function to join a custom thread. Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn
typedef struct OrtCustomOp OrtCustomOp |
typedef struct OrtCustomOpDomain OrtCustomOpDomain |
typedef const struct OrtCustomHandleType* OrtCustomThreadHandle |
typedef struct OrtDnnlProviderOptions OrtDnnlProviderOptions |
typedef enum OrtErrorCode OrtErrorCode |
typedef struct OrtIoBinding OrtIoBinding |
typedef struct OrtKernelContext OrtKernelContext |
typedef struct OrtKernelInfo OrtKernelInfo |
typedef enum OrtLanguageProjection OrtLanguageProjection |
Language projection identifiers /see OrtApi::SetLanguageProjection.
typedef void( * OrtLoggingFunction) (void *param, OrtLoggingLevel severity, const char *category, const char *logid, const char *code_location, const char *message) |
typedef enum OrtLoggingLevel OrtLoggingLevel |
Logging severity levels.
In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show.
typedef struct OrtMapTypeInfo OrtMapTypeInfo |
typedef struct OrtMemoryInfo OrtMemoryInfo |
typedef enum OrtMemoryInfoDeviceType OrtMemoryInfoDeviceType |
This mimics OrtDevice type constants so they can be returned in the API.
typedef enum OrtMemType OrtMemType |
Memory types for allocated memory, execution provider specific types should be extended in each provider.
typedef struct OrtMIGraphXProviderOptions OrtMIGraphXProviderOptions |
MIGraphX Provider Options.
typedef struct OrtModelMetadata OrtModelMetadata |
typedef enum OrtOpAttrType OrtOpAttrType |
typedef struct OrtOpenVINOProviderOptions OrtOpenVINOProviderOptions |
OpenVINO Provider Options.
typedef struct OrtOptionalTypeInfo OrtOptionalTypeInfo |
typedef struct OrtPrepackedWeightsContainer OrtPrepackedWeightsContainer |
typedef struct OrtROCMProviderOptions OrtROCMProviderOptions |
ROCM Provider Options.
typedef struct OrtRunOptions OrtRunOptions |
typedef struct OrtSequenceTypeInfo OrtSequenceTypeInfo |
typedef struct OrtSession OrtSession |
typedef struct OrtSessionOptions OrtSessionOptions |
typedef struct OrtShapeInferContext OrtShapeInferContext |
typedef enum OrtSparseFormat OrtSparseFormat |
typedef OrtStatus* OrtStatusPtr |
typedef struct OrtTensorRTProviderOptions OrtTensorRTProviderOptions |
TensorRT Provider Options.
typedef struct OrtTensorRTProviderOptionsV2 OrtTensorRTProviderOptionsV2 |
typedef struct OrtTensorTypeAndShapeInfo OrtTensorTypeAndShapeInfo |
typedef struct OrtThreadingOptions OrtThreadingOptions |
typedef struct OrtThreadPoolParams OrtThreadPoolParams |
typedef void(* OrtThreadWorkerFn) (void *ort_worker_fn_param) |
Thread work loop function.
Onnxruntime will provide the working loop on custom thread creation Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn
typedef struct OrtTrainingApi OrtTrainingApi |
typedef struct OrtTypeInfo OrtTypeInfo |
typedef OrtStatus *( * RegisterCustomOpsFn) (OrtSessionOptions *options, const OrtApiBase *api) |
typedef void(* RunAsyncCallbackFn) (void *user_data, OrtValue **outputs, size_t num_outputs, OrtStatusPtr status) |
Callback function for RunAsync.
[in] | user_data | User specific data that passed back to the callback |
[out] | outputs | On succeed, outputs host inference results, on error, the value will be nullptr |
[out] | num_outputs | Number of outputs, on error, the value will be zero |
[out] | status | On error, status will provide details |
enum ExecutionMode |
Graph optimization level.
Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels for an in-depth understanding of the Graph Optimization Levels.
Enumerator | |
---|---|
ORT_DISABLE_ALL | |
ORT_ENABLE_BASIC | |
ORT_ENABLE_EXTENDED | |
ORT_ENABLE_ALL |
Copied from TensorProto::DataType Currently, Ort doesn't support complex64, complex128
enum ONNXType |
enum OrtAllocatorType |
enum OrtErrorCode |
Language projection identifiers /see OrtApi::SetLanguageProjection.
Enumerator | |
---|---|
ORT_PROJECTION_C | |
ORT_PROJECTION_CPLUSPLUS | |
ORT_PROJECTION_CSHARP | |
ORT_PROJECTION_PYTHON | |
ORT_PROJECTION_JAVA | |
ORT_PROJECTION_WINML | |
ORT_PROJECTION_NODEJS |
enum OrtLoggingLevel |
Logging severity levels.
In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show.
enum OrtMemType |
Memory types for allocated memory, execution provider specific types should be extended in each provider.
enum OrtOpAttrType |
enum OrtSparseFormat |
const OrtApiBase * OrtGetApiBase | ( | void | ) |
The Onnxruntime library's entry point to access the C API.
Call this to get the a pointer to an OrtApiBase
OrtStatus * OrtSessionOptionsAppendExecutionProvider_CUDA | ( | OrtSessionOptions * | options, |
int | device_id | ||
) |
OrtStatus * OrtSessionOptionsAppendExecutionProvider_Dnnl | ( | OrtSessionOptions * | options, |
int | use_arena | ||
) |
OrtStatus * OrtSessionOptionsAppendExecutionProvider_MIGraphX | ( | OrtSessionOptions * | options, |
int | device_id | ||
) |
OrtStatus * OrtSessionOptionsAppendExecutionProvider_ROCM | ( | OrtSessionOptions * | options, |
int | device_id | ||
) |
OrtStatus * OrtSessionOptionsAppendExecutionProvider_Tensorrt | ( | OrtSessionOptions * | options, |
int | device_id | ||
) |