41#define ORT_API_VERSION 18
59#define _Frees_ptr_opt_
60#define _Ret_maybenull_
63#define _Outptr_result_maybenull_
65#define _Inout_updates_(X)
66#define _Out_writes_(X)
67#define _Inout_updates_all_(X)
68#define _Out_writes_bytes_all_(X)
69#define _Out_writes_all_(X)
71#define _Outptr_result_buffer_maybenull_(X)
72#define ORT_ALL_ARGS_NONNULL __attribute__((nonnull))
74#include <specstrings.h>
75#define ORT_ALL_ARGS_NONNULL
82#define ORT_EXPORT __declspec(dllimport)
86#define ORT_API_CALL _stdcall
87#define ORT_MUST_USE_RESULT
88#define ORTCHAR_T wchar_t
92#define ORT_EXPORT __attribute__((visibility("default")))
97#define ORT_MUST_USE_RESULT __attribute__((warn_unused_result))
105#define ORT_TSTR(X) L##X
107#define ORT_TSTR_ON_MACRO(X) L"" X
110#define ORT_TSTR_ON_MACRO(X) X
117#define ORT_FILE_INTERNAL(x) ORT_TSTR(x)
118#define ORT_FILE ORT_FILE_INTERNAL(__FILE__)
131#define __has_feature(x) 0
133#if ((__cplusplus >= 201103L) || (_MSC_VER >= 1900) || (defined(__has_feature) && __has_feature(cxx_noexcept)))
134#define NO_EXCEPTION noexcept
136#define NO_EXCEPTION throw()
143#define ORT_API(RETURN_TYPE, NAME, ...) RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
145#define ORT_API_STATUS(NAME, ...) \
146 _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) \
147 NO_EXCEPTION ORT_MUST_USE_RESULT
150#define ORT_API2_STATUS(NAME, ...) \
151 _Check_return_ _Ret_maybenull_ OrtStatusPtr(ORT_API_CALL* NAME)(__VA_ARGS__) NO_EXCEPTION ORT_MUST_USE_RESULT
154#define ORT_API_STATUS_IMPL(NAME, ...) \
155 _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION
157#define ORT_CLASS_RELEASE(X) void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input)
161#define ORT_API_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__)
162#undef ORT_API2_STATUS
163#define ORT_API2_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__)
164#undef ORT_CLASS_RELEASE
165#define ORT_CLASS_RELEASE(X) void Release##X(Ort##X* input)
268#define ORT_RUNTIME_CLASS(X) \
270 typedef struct Ort##X Ort##X;
277ORT_RUNTIME_CLASS(Env);
278ORT_RUNTIME_CLASS(Status);
279ORT_RUNTIME_CLASS(MemoryInfo);
280ORT_RUNTIME_CLASS(IoBinding);
281ORT_RUNTIME_CLASS(Session);
282ORT_RUNTIME_CLASS(Value);
283ORT_RUNTIME_CLASS(RunOptions);
284ORT_RUNTIME_CLASS(TypeInfo);
285ORT_RUNTIME_CLASS(TensorTypeAndShapeInfo);
286ORT_RUNTIME_CLASS(MapTypeInfo);
287ORT_RUNTIME_CLASS(SequenceTypeInfo);
288ORT_RUNTIME_CLASS(OptionalTypeInfo);
289ORT_RUNTIME_CLASS(SessionOptions);
290ORT_RUNTIME_CLASS(CustomOpDomain);
291ORT_RUNTIME_CLASS(ModelMetadata);
292ORT_RUNTIME_CLASS(ThreadPoolParams);
293ORT_RUNTIME_CLASS(ThreadingOptions);
294ORT_RUNTIME_CLASS(ArenaCfg);
295ORT_RUNTIME_CLASS(PrepackedWeightsContainer);
296ORT_RUNTIME_CLASS(TensorRTProviderOptionsV2);
297ORT_RUNTIME_CLASS(CUDAProviderOptionsV2);
298ORT_RUNTIME_CLASS(CANNProviderOptions);
299ORT_RUNTIME_CLASS(DnnlProviderOptions);
300ORT_RUNTIME_CLASS(Op);
301ORT_RUNTIME_CLASS(OpAttr);
302ORT_RUNTIME_CLASS(Logger);
303ORT_RUNTIME_CLASS(ShapeInferContext);
325 void* param,
OrtLoggingLevel severity,
const char* category,
const char* logid,
const char* code_location,
326 const char* message);
852 _In_reads_(input_len)
const char*
const* input_names,
853 _In_reads_(input_len)
const OrtValue*
const* inputs,
size_t input_len,
854 _In_reads_(output_names_len)
const char*
const* output_names,
size_t output_names_len,
855 _Inout_updates_all_(output_names_len)
OrtValue** outputs);
886 _In_
const ORTCHAR_T* optimized_model_filepath);
1255 _Out_
int* log_verbosity_level);
1399 size_t s_len, _Out_writes_all_(offsets_len)
size_t* offsets,
size_t offsets_len);
1488 size_t dim_values_length);
1499 _Out_writes_all_(dim_params_length)
const char* dim_params[],
size_t dim_params_length);
1650 _In_ int64_t dim_value);
1726 ORT_API2_STATUS(
CreateValue, _In_reads_(num_values)
const OrtValue*
const* in,
size_t num_values,
1751 ORT_API2_STATUS(
CreateOpaqueValue, _In_z_
const char* domain_name, _In_z_
const char* type_name,
1752 _In_
const void* data_container,
size_t data_container_size, _Outptr_
OrtValue** out);
1768 ORT_API2_STATUS(
GetOpaqueValue, _In_
const char* domain_name, _In_
const char* type_name, _In_
const OrtValue* in,
1769 _Out_
void* data_container,
size_t data_container_size);
1796 _Out_ int64_t* out);
1819 _Inout_
size_t* size);
1850 _In_
const int64_t* dim_values,
size_t dim_count, _Outptr_
OrtValue** out);
1855 ORT_CLASS_RELEASE(Env);
1859 ORT_CLASS_RELEASE(Status);
1863 ORT_CLASS_RELEASE(MemoryInfo);
1867 ORT_CLASS_RELEASE(Session);
1871 ORT_CLASS_RELEASE(Value);
1875 ORT_CLASS_RELEASE(RunOptions);
1879 ORT_CLASS_RELEASE(TypeInfo);
1883 ORT_CLASS_RELEASE(TensorTypeAndShapeInfo);
1887 ORT_CLASS_RELEASE(SessionOptions);
1891 ORT_CLASS_RELEASE(CustomOpDomain);
1989 ORT_CLASS_RELEASE(MapTypeInfo);
1993 ORT_CLASS_RELEASE(SequenceTypeInfo);
2055 _Outptr_
char** value);
2079 _Inout_
OrtAllocator* allocator, _In_
const char* key, _Outptr_result_maybenull_
char** value);
2090 ORT_CLASS_RELEASE(ModelMetadata);
2138 ORT_CLASS_RELEASE(ThreadingOptions);
2156 _Inout_
OrtAllocator* allocator, _Outptr_result_buffer_maybenull_(*num_keys)
char*** keys, _Out_ int64_t* num_keys);
2171 _In_ int64_t dim_value);
2199 _In_
int providers_length);
2253 _In_z_
const char* config_key, _In_z_
const char* config_value);
2272 ORT_CLASS_RELEASE(Allocator);
2309 ORT_CLASS_RELEASE(IoBinding);
2370 _Out_
char** buffer, _Out_writes_all_(count)
size_t** lengths, _Out_
size_t* count);
2390 _Out_writes_all_(output_count)
OrtValue*** output, _Out_
size_t* output_count);
2418 ORT_API2_STATUS(
TensorAt, _Inout_
OrtValue* value,
const int64_t* location_values,
size_t location_values_count, _Outptr_
void** out);
2629 ORT_API2_STATUS(
CreateArenaCfg, _In_
size_t max_mem,
int arena_extend_strategy,
int initial_chunk_size_bytes,
2632 ORT_CLASS_RELEASE(ArenaCfg);
2724 _Out_
float* out, _Inout_
size_t* size);
2748 _Out_ int64_t* out, _Inout_
size_t* size);
2785 ORT_API2_STATUS(
CreateArenaCfgV2, _In_reads_(num_keys)
const char*
const* arena_config_keys,
2786 _In_reads_(num_keys)
const size_t* arena_config_values, _In_
size_t num_keys,
2806 _In_z_
const char* config_key, _In_z_
const char* config_value);
2830 ORT_CLASS_RELEASE(PrepackedWeightsContainer);
2876 _In_
const void* model_data,
size_t model_data_length,
2932 _In_reads_(num_keys)
const char*
const* provider_options_keys,
2933 _In_reads_(num_keys)
const char*
const* provider_options_values,
2934 _In_
size_t num_keys);
3052 _In_
const int64_t* values_shape,
size_t values_shape_len, _In_
const void* values,
3053 _In_
const int64_t* indices_data,
size_t indices_num);
3075 _In_
const int64_t* values_shape,
size_t values_shape_len, _In_
const void* values,
3076 _In_
const int64_t* inner_indices_data,
size_t inner_indices_num,
3077 _In_
const int64_t* outer_indices_data,
size_t outer_indices_num);
3098 _In_
const int64_t* values_shape,
size_t values_shape_len, _In_
const void* values,
3099 _In_
const int64_t* indices_shape_data,
size_t indices_shape_len,
3100 _In_
const int32_t* indices_data);
3127 _In_
const int64_t* dense_shape,
size_t dense_shape_len,
3128 _In_
const int64_t* values_shape,
size_t values_shape_len,
3163 ORT_API2_STATUS(
UseCsrIndices, _Inout_
OrtValue* ort_value, _Inout_ int64_t* inner_data,
size_t inner_num,
3164 _Inout_ int64_t* outer_data,
size_t outer_num);
3289 ORT_API2_STATUS(
GetExecutionProviderApi, _In_
const char* provider_name, _In_ uint32_t version, _Outptr_
const void** provider_api);
3430 _In_reads_(num_keys)
const char*
const* provider_options_keys,
3431 _In_reads_(num_keys)
const char*
const* provider_options_values,
3432 _In_
size_t num_keys);
3496 _In_reads_(input_len)
const char*
const* initializer_names,
3497 _In_reads_(input_len)
const OrtValue*
const* initializers,
size_t initializers_num);
3510 _In_
const char* name,
3511 _In_
const void* data,
3522 ORT_CLASS_RELEASE(OpAttr);
3543 _In_z_
const char* op_name,
3544 _In_z_
const char* domain,
3546 _In_reads_(type_constraint_count)
const char** type_constraint_names,
3548 int type_constraint_count,
3549 _In_reads_(attr_count)
const OrtOpAttr*
const* attr_values,
3569 _In_
const OrtOp* ort_op,
3570 _In_
const OrtValue*
const* input_values,
3571 _In_
int input_count,
3572 _Inout_
OrtValue*
const* output_values,
3573 _In_
int output_count);
3581 ORT_CLASS_RELEASE(Op);
3645 _In_
const char* provider_name,
3646 _In_reads_(num_keys)
const char*
const* provider_options_keys,
3647 _In_reads_(num_keys)
const char*
const* provider_options_values,
3648 _In_
size_t num_keys);
3667 ORT_CLASS_RELEASE(KernelInfo);
3725 _In_reads_(num_keys)
const char*
const* provider_options_keys,
3726 _In_reads_(num_keys)
const char*
const* provider_options_values,
3727 _In_
size_t num_keys);
3834 _In_
const char* registration_func_name);
3891 _Inout_
size_t* size);
3919 _Inout_
size_t* size);
3987 _In_z_
const char* config_key, _Out_
int* out);
4018 _In_z_
const char* config_key, _Out_
char* config_value, _Inout_
size_t* size);
4063 _In_reads_(num_keys)
const char*
const* provider_options_keys,
4064 _In_reads_(num_keys)
const char*
const* provider_options_values,
4065 _In_
size_t num_keys);
4172 _In_z_
const char* message, _In_z_
const ORTCHAR_T* file_path,
int line_number,
4173 _In_z_
const char* func_name);
4310 _In_reads_(num_keys)
const char*
const* provider_options_keys,
4311 _In_reads_(num_keys)
const char*
const* provider_options_values,
4312 _In_
size_t num_keys);
4352 _In_reads_(num_keys)
const char*
const* provider_options_keys, _In_reads_(num_keys)
const char*
const* provider_options_values, _In_
size_t num_keys);
4373 _In_reads_(input_len)
const char*
const* input_names,
4374 _In_reads_(input_len)
const OrtValue*
const* input,
size_t input_len,
4375 _In_reads_(output_names_len)
const char*
const* output_names,
size_t output_names_len,
4376 _Inout_updates_all_(output_names_len)
OrtValue** output,
4569 _In_reads_(num_keys)
const char*
const* provider_options_keys,
4570 _In_reads_(num_keys)
const char*
const* provider_options_values,
4571 _In_
size_t num_keys);
4659 _Out_
void** kernel);
OrtStatus * OrtSessionOptionsAppendExecutionProvider_MIGraphX(OrtSessionOptions *options, int device_id)
struct OrtMemoryInfo OrtMemoryInfo
Definition onnxruntime_c_api.h:279
struct OrtKernelInfo OrtKernelInfo
Definition onnxruntime_c_api.h:359
OrtStatus * OrtSessionOptionsAppendExecutionProvider_Tensorrt(OrtSessionOptions *options, int device_id)
OrtLoggingLevel
Logging severity levels.
Definition onnxruntime_c_api.h:234
const struct OrtCustomHandleType * OrtCustomThreadHandle
OrtMemoryInfoDeviceType
This mimics OrtDevice type constants so they can be returned in the API.
Definition onnxruntime_c_api.h:383
struct OrtShapeInferContext OrtShapeInferContext
Definition onnxruntime_c_api.h:303
void(* OrtLoggingFunction)(void *param, OrtLoggingLevel severity, const char *category, const char *logid, const char *code_location, const char *message)
Definition onnxruntime_c_api.h:324
void(* OrtCustomJoinThreadFn)(OrtCustomThreadHandle ort_custom_thread_handle)
Custom thread join function.
Definition onnxruntime_c_api.h:702
OrtStatus *(* RegisterCustomOpsFn)(OrtSessionOptions *options, const OrtApiBase *api)
Definition onnxruntime_c_api.h:704
OrtCustomOpInputOutputCharacteristic
Definition onnxruntime_c_api.h:4589
struct OrtTensorRTProviderOptionsV2 OrtTensorRTProviderOptionsV2
Definition onnxruntime_c_api.h:296
struct OrtOpAttr OrtOpAttr
Definition onnxruntime_c_api.h:301
struct OrtThreadingOptions OrtThreadingOptions
Definition onnxruntime_c_api.h:293
struct OrtSequenceTypeInfo OrtSequenceTypeInfo
Definition onnxruntime_c_api.h:287
OrtLanguageProjection
Language projection identifiers /see OrtApi::SetLanguageProjection.
Definition onnxruntime_c_api.h:348
struct OrtDnnlProviderOptions OrtDnnlProviderOptions
Definition onnxruntime_c_api.h:299
OrtSparseIndicesFormat
Definition onnxruntime_c_api.h:223
struct OrtPrepackedWeightsContainer OrtPrepackedWeightsContainer
Definition onnxruntime_c_api.h:295
struct OrtSession OrtSession
Definition onnxruntime_c_api.h:281
struct OrtCustomOpDomain OrtCustomOpDomain
Definition onnxruntime_c_api.h:290
struct OrtIoBinding OrtIoBinding
Definition onnxruntime_c_api.h:280
OrtAllocatorType
Definition onnxruntime_c_api.h:365
struct OrtOp OrtOp
Definition onnxruntime_c_api.h:300
struct OrtModelMetadata OrtModelMetadata
Definition onnxruntime_c_api.h:291
struct OrtTypeInfo OrtTypeInfo
Definition onnxruntime_c_api.h:284
struct OrtTensorTypeAndShapeInfo OrtTensorTypeAndShapeInfo
Definition onnxruntime_c_api.h:285
struct OrtCUDAProviderOptionsV2 OrtCUDAProviderOptionsV2
Definition onnxruntime_c_api.h:297
struct OrtKernelContext OrtKernelContext
Definition onnxruntime_c_api.h:361
OrtStatus * OrtSessionOptionsAppendExecutionProvider_Dnnl(OrtSessionOptions *options, int use_arena)
OrtCudnnConvAlgoSearch
Algorithm to use for cuDNN Convolution Op.
Definition onnxruntime_c_api.h:391
struct OrtCANNProviderOptions OrtCANNProviderOptions
Definition onnxruntime_c_api.h:298
void(* RunAsyncCallbackFn)(void *user_data, OrtValue **outputs, size_t num_outputs, OrtStatusPtr status)
Callback function for RunAsync.
Definition onnxruntime_c_api.h:713
struct OrtRunOptions OrtRunOptions
Definition onnxruntime_c_api.h:283
void(* OrtThreadWorkerFn)(void *ort_worker_fn_param)
Thread work loop function.
Definition onnxruntime_c_api.h:684
OrtStatus * OrtSessionOptionsAppendExecutionProvider_ROCM(OrtSessionOptions *options, int device_id)
struct OrtOptionalTypeInfo OrtOptionalTypeInfo
Definition onnxruntime_c_api.h:288
struct OrtSessionOptions OrtSessionOptions
Definition onnxruntime_c_api.h:289
struct OrtValue OrtValue
Definition onnxruntime_c_api.h:282
GraphOptimizationLevel
Graph optimization level.
Definition onnxruntime_c_api.h:333
OrtStatus * OrtStatusPtr
Definition onnxruntime_c_api.h:308
OrtMemType
Memory types for allocated memory, execution provider specific types should be extended in each provi...
Definition onnxruntime_c_api.h:374
OrtSparseFormat
Definition onnxruntime_c_api.h:215
ONNXType
Definition onnxruntime_c_api.h:203
struct OrtEnv OrtEnv
Definition onnxruntime_c_api.h:277
OrtErrorCode
Definition onnxruntime_c_api.h:242
struct OrtStatus OrtStatus
Definition onnxruntime_c_api.h:278
struct OrtLogger OrtLogger
Definition onnxruntime_c_api.h:302
struct OrtMapTypeInfo OrtMapTypeInfo
Definition onnxruntime_c_api.h:286
struct OrtArenaCfg OrtArenaCfg
Definition onnxruntime_c_api.h:294
ExecutionMode
Definition onnxruntime_c_api.h:340
OrtStatus * OrtSessionOptionsAppendExecutionProvider_CUDA(OrtSessionOptions *options, int device_id)
OrtOpAttrType
Definition onnxruntime_c_api.h:257
OrtCustomThreadHandle(* OrtCustomCreateThreadFn)(void *ort_custom_thread_creation_options, OrtThreadWorkerFn ort_thread_worker_fn, void *ort_worker_fn_param)
Ort custom thread creation function.
Definition onnxruntime_c_api.h:695
ONNXTensorElementDataType
Definition onnxruntime_c_api.h:177
const OrtApiBase * OrtGetApiBase(void)
The Onnxruntime library's entry point to access the C API.
@ ORT_LOGGING_LEVEL_VERBOSE
Verbose informational messages (least severe).
Definition onnxruntime_c_api.h:235
@ ORT_LOGGING_LEVEL_INFO
Informational messages.
Definition onnxruntime_c_api.h:236
@ ORT_LOGGING_LEVEL_ERROR
Error messages.
Definition onnxruntime_c_api.h:238
@ ORT_LOGGING_LEVEL_WARNING
Warning messages.
Definition onnxruntime_c_api.h:237
@ ORT_LOGGING_LEVEL_FATAL
Fatal error messages (most severe).
Definition onnxruntime_c_api.h:239
@ OrtMemoryInfoDeviceType_GPU
Definition onnxruntime_c_api.h:385
@ OrtMemoryInfoDeviceType_FPGA
Definition onnxruntime_c_api.h:386
@ OrtMemoryInfoDeviceType_CPU
Definition onnxruntime_c_api.h:384
@ INPUT_OUTPUT_VARIADIC
Definition onnxruntime_c_api.h:4592
@ INPUT_OUTPUT_REQUIRED
Definition onnxruntime_c_api.h:4590
@ INPUT_OUTPUT_OPTIONAL
Definition onnxruntime_c_api.h:4591
@ ORT_PROJECTION_C
Definition onnxruntime_c_api.h:349
@ ORT_PROJECTION_PYTHON
Definition onnxruntime_c_api.h:352
@ ORT_PROJECTION_CPLUSPLUS
Definition onnxruntime_c_api.h:350
@ ORT_PROJECTION_WINML
Definition onnxruntime_c_api.h:354
@ ORT_PROJECTION_CSHARP
Definition onnxruntime_c_api.h:351
@ ORT_PROJECTION_JAVA
Definition onnxruntime_c_api.h:353
@ ORT_PROJECTION_NODEJS
Definition onnxruntime_c_api.h:355
@ ORT_SPARSE_COO_INDICES
Definition onnxruntime_c_api.h:224
@ ORT_SPARSE_BLOCK_SPARSE_INDICES
Definition onnxruntime_c_api.h:227
@ ORT_SPARSE_CSR_OUTER_INDICES
Definition onnxruntime_c_api.h:226
@ ORT_SPARSE_CSR_INNER_INDICES
Definition onnxruntime_c_api.h:225
@ OrtDeviceAllocator
Definition onnxruntime_c_api.h:367
@ OrtArenaAllocator
Definition onnxruntime_c_api.h:368
@ OrtInvalidAllocator
Definition onnxruntime_c_api.h:366
@ OrtCudnnConvAlgoSearchDefault
Definition onnxruntime_c_api.h:394
@ OrtCudnnConvAlgoSearchExhaustive
Definition onnxruntime_c_api.h:392
@ OrtCudnnConvAlgoSearchHeuristic
Definition onnxruntime_c_api.h:393
@ ORT_ENABLE_BASIC
Definition onnxruntime_c_api.h:335
@ ORT_ENABLE_ALL
Definition onnxruntime_c_api.h:337
@ ORT_DISABLE_ALL
Definition onnxruntime_c_api.h:334
@ ORT_ENABLE_EXTENDED
Definition onnxruntime_c_api.h:336
@ OrtMemTypeCPUInput
Any CPU memory used by non-CPU execution provider.
Definition onnxruntime_c_api.h:375
@ OrtMemTypeCPU
Temporary CPU accessible memory allocated by non-CPU execution provider, i.e. CUDA_PINNED.
Definition onnxruntime_c_api.h:377
@ OrtMemTypeDefault
The default allocator for execution provider.
Definition onnxruntime_c_api.h:378
@ OrtMemTypeCPUOutput
CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED.
Definition onnxruntime_c_api.h:376
@ ORT_SPARSE_CSRC
Definition onnxruntime_c_api.h:218
@ ORT_SPARSE_COO
Definition onnxruntime_c_api.h:217
@ ORT_SPARSE_BLOCK_SPARSE
Definition onnxruntime_c_api.h:219
@ ORT_SPARSE_UNDEFINED
Definition onnxruntime_c_api.h:216
@ ONNX_TYPE_SEQUENCE
Definition onnxruntime_c_api.h:206
@ ONNX_TYPE_MAP
Definition onnxruntime_c_api.h:207
@ ONNX_TYPE_OPAQUE
Definition onnxruntime_c_api.h:208
@ ONNX_TYPE_UNKNOWN
Definition onnxruntime_c_api.h:204
@ ONNX_TYPE_TENSOR
Definition onnxruntime_c_api.h:205
@ ONNX_TYPE_SPARSETENSOR
Definition onnxruntime_c_api.h:209
@ ONNX_TYPE_OPTIONAL
Definition onnxruntime_c_api.h:210
@ ORT_NO_SUCHFILE
Definition onnxruntime_c_api.h:246
@ ORT_OK
Definition onnxruntime_c_api.h:243
@ ORT_INVALID_ARGUMENT
Definition onnxruntime_c_api.h:245
@ ORT_EP_FAIL
Definition onnxruntime_c_api.h:254
@ ORT_NOT_IMPLEMENTED
Definition onnxruntime_c_api.h:252
@ ORT_RUNTIME_EXCEPTION
Definition onnxruntime_c_api.h:249
@ ORT_ENGINE_ERROR
Definition onnxruntime_c_api.h:248
@ ORT_FAIL
Definition onnxruntime_c_api.h:244
@ ORT_INVALID_PROTOBUF
Definition onnxruntime_c_api.h:250
@ ORT_NO_MODEL
Definition onnxruntime_c_api.h:247
@ ORT_INVALID_GRAPH
Definition onnxruntime_c_api.h:253
@ ORT_MODEL_LOADED
Definition onnxruntime_c_api.h:251
@ ORT_PARALLEL
Definition onnxruntime_c_api.h:342
@ ORT_SEQUENTIAL
Definition onnxruntime_c_api.h:341
@ ORT_OP_ATTR_INT
Definition onnxruntime_c_api.h:259
@ ORT_OP_ATTR_FLOATS
Definition onnxruntime_c_api.h:262
@ ORT_OP_ATTR_STRINGS
Definition onnxruntime_c_api.h:264
@ ORT_OP_ATTR_UNDEFINED
Definition onnxruntime_c_api.h:258
@ ORT_OP_ATTR_INTS
Definition onnxruntime_c_api.h:260
@ ORT_OP_ATTR_STRING
Definition onnxruntime_c_api.h:263
@ ORT_OP_ATTR_FLOAT
Definition onnxruntime_c_api.h:261
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING
Definition onnxruntime_c_api.h:186
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32
Definition onnxruntime_c_api.h:184
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32
Definition onnxruntime_c_api.h:190
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16
Definition onnxruntime_c_api.h:182
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED
Definition onnxruntime_c_api.h:178
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128
Definition onnxruntime_c_api.h:193
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ
Definition onnxruntime_c_api.h:199
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64
Definition onnxruntime_c_api.h:191
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64
Definition onnxruntime_c_api.h:185
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2
Definition onnxruntime_c_api.h:198
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL
Definition onnxruntime_c_api.h:187
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16
Definition onnxruntime_c_api.h:188
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8
Definition onnxruntime_c_api.h:180
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16
Definition onnxruntime_c_api.h:183
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE
Definition onnxruntime_c_api.h:189
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8
Definition onnxruntime_c_api.h:181
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
Definition onnxruntime_c_api.h:179
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN
Definition onnxruntime_c_api.h:196
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16
Definition onnxruntime_c_api.h:194
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64
Definition onnxruntime_c_api.h:192
@ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ
Definition onnxruntime_c_api.h:197
Memory allocation interface.
Definition onnxruntime_c_api.h:317
void(* Free)(struct OrtAllocator *this_, void *p)
Free a block of memory previously allocated with OrtAllocator::Alloc.
Definition onnxruntime_c_api.h:320
const struct OrtMemoryInfo *(* Info)(const struct OrtAllocator *this_)
Return a pointer to an OrtMemoryInfo that describes this allocator.
Definition onnxruntime_c_api.h:321
uint32_t version
Must be initialized to ORT_API_VERSION.
Definition onnxruntime_c_api.h:318
void *(* Alloc)(struct OrtAllocator *this_, size_t size)
Returns a pointer to an allocated block of size bytes.
Definition onnxruntime_c_api.h:319
The helper interface to get the right version of OrtApi.
Definition onnxruntime_c_api.h:652
const char *(* GetVersionString)(void)
Returns a null terminated string of the version of the Onnxruntime library (eg: "1....
Definition onnxruntime_c_api.h:668
const OrtApi *(* GetApi)(uint32_t version)
Get a pointer to the requested version of the OrtApi.
Definition onnxruntime_c_api.h:662
The C API.
Definition onnxruntime_c_api.h:722
OrtStatus * SetGlobalIntraOpThreadAffinity(OrtThreadingOptions *tp_options, const char *affinity_string)
OrtStatus * ShapeInferContext_SetOutputTypeShape(const OrtShapeInferContext *context, size_t index, const OrtTensorTypeAndShapeInfo *info)
OrtStatus * SessionGetOverridableInitializerTypeInfo(const OrtSession *session, size_t index, OrtTypeInfo **type_info)
Get overridable initializer type information.
OrtStatus * SessionOptionsSetCustomJoinThreadFn(OrtSessionOptions *options, OrtCustomJoinThreadFn ort_custom_join_thread_fn)
Set custom thread join function.
OrtStatus * KernelInfoGetAttributeArray_int64(const OrtKernelInfo *info, const char *name, int64_t *out, size_t *size)
Fetch an array of int64_t values stored as an attribute in the graph node.
OrtStatus * CreateSessionOptions(OrtSessionOptions **options)
Create an OrtSessionOptions object.
void(* ReleaseDnnlProviderOptions)(OrtDnnlProviderOptions *input)
Release an OrtDnnlProviderOptions.
Definition onnxruntime_c_api.h:4087
OrtStatus * TensorAt(OrtValue *value, const int64_t *location_values, size_t location_values_count, void **out)
Direct memory access to a specified tensor element.
OrtStatus * KernelInfoGetAttribute_float(const OrtKernelInfo *info, const char *name, float *out)
Get a float stored as an attribute in the graph node.
OrtStatus * GetCANNProviderOptionsAsString(const OrtCANNProviderOptions *cann_options, OrtAllocator *allocator, char **ptr)
Get serialized CANN provider options string.
OrtStatus * InvokeOp(const OrtKernelContext *context, const OrtOp *ort_op, const OrtValue *const *input_values, int input_count, OrtValue *const *output_values, int output_count)
: Invoke the operator created by OrtApi::CreateOp The inputs must follow the order as specified in on...
OrtStatus * HasSessionConfigEntry(const OrtSessionOptions *options, const char *config_key, int *out)
Checks if the given session configuration entry exists.
const char *(* GetBuildInfoString)(void)
Returns a null terminated string of the build info including git info and cxx flags.
Definition onnxruntime_c_api.h:4277
OrtStatus * GetTensorMemoryInfo(const OrtValue *value, const OrtMemoryInfo **mem_info)
Returns a pointer to the OrtMemoryInfo of a Tensor.
OrtStatus * EnableCpuMemArena(OrtSessionOptions *options)
Enable the memory arena on CPU.
OrtStatus * CreateSparseTensorWithValuesAsOrtValue(const OrtMemoryInfo *info, void *p_data, const int64_t *dense_shape, size_t dense_shape_len, const int64_t *values_shape, size_t values_shape_len, ONNXTensorElementDataType type, OrtValue **out)
OrtStatus * GetValueCount(const OrtValue *value, size_t *out)
Get non tensor value count from an OrtValue.
OrtStatus * SetGlobalCustomJoinThreadFn(OrtThreadingOptions *tp_options, OrtCustomJoinThreadFn ort_custom_join_thread_fn)
Set custom thread join function for global thread pools.
OrtStatus * CreateCUDAProviderOptions(OrtCUDAProviderOptionsV2 **out)
Create an OrtCUDAProviderOptionsV2.
OrtStatus * DisableProfiling(OrtSessionOptions *options)
Disable profiling for a session.
OrtStatus * KernelInfoGetAttributeArray_float(const OrtKernelInfo *info, const char *name, float *out, size_t *size)
Fetch an array of int64_t values stored as an attribute in the graph node.
OrtStatus * CreatePrepackedWeightsContainer(OrtPrepackedWeightsContainer **out)
Create an OrtPrepackedWeightsContainer.
OrtStatus * SetDeterministicCompute(OrtSessionOptions *options, bool value)
Set whether to use deterministic compute.
OrtStatus * UpdateTensorRTProviderOptionsWithValue(OrtTensorRTProviderOptionsV2 *tensorrt_options, const char *key, void *value)
OrtStatus * CreateSessionFromArrayWithPrepackedWeightsContainer(const OrtEnv *env, const void *model_data, size_t model_data_length, const OrtSessionOptions *options, OrtPrepackedWeightsContainer *prepacked_weights_container, OrtSession **out)
Create session from memory with prepacked weights container.
OrtStatus * AddFreeDimensionOverrideByName(OrtSessionOptions *options, const char *dim_name, int64_t dim_value)
OrtStatus * KernelInfo_GetInputCount(const OrtKernelInfo *info, size_t *out)
Get the number of inputs from OrtKernelInfo.
OrtStatus * GetSparseTensorFormat(const OrtValue *ort_value, enum OrtSparseFormat *out)
Returns sparse tensor format enum iff a given ort value contains an instance of sparse tensor.
OrtStatus * KernelContext_GetGPUComputeStream(const OrtKernelContext *context, void **out)
Used for custom operators, gets the GPU compute stream to use to launch the custom a GPU kernel.
OrtStatus * UpdateCANNProviderOptions(OrtCANNProviderOptions *cann_options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Set options in a CANN Execution Provider.
OrtStatus * CreateAndRegisterAllocatorV2(OrtEnv *env, const char *provider_type, const OrtMemoryInfo *mem_info, const OrtArenaCfg *arena_cfg, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Create an allocator with specific type and register it with the OrtEnv This API enhance CreateAndRegi...
OrtStatus * SessionGetOutputName(const OrtSession *session, size_t index, OrtAllocator *allocator, char **value)
Get output name.
OrtStatus * SessionOptionsAppendExecutionProvider_TensorRT(OrtSessionOptions *options, const OrtTensorRTProviderOptions *tensorrt_options)
Append TensorRT provider to session options.
const OrtTrainingApi *(* GetTrainingApi)(uint32_t version)
Gets the Training C Api struct.
Definition onnxruntime_c_api.h:3685
OrtStatus * SetIntraOpNumThreads(OrtSessionOptions *options, int intra_op_num_threads)
Sets the number of threads used to parallelize the execution within nodes.
OrtStatus * GetTypeInfo(const OrtValue *value, OrtTypeInfo **out)
Get type information of an OrtValue.
OrtStatus * CastTypeInfoToMapTypeInfo(const OrtTypeInfo *type_info, const OrtMapTypeInfo **out)
Get detailed map information from an OrtTypeInfo.
OrtStatus * KernelContext_GetLogger(const OrtKernelContext *context, const OrtLogger **logger)
Get the runtime logger from OrtKernelContext.
OrtStatus * SetGlobalCustomThreadCreationOptions(OrtThreadingOptions *tp_options, void *ort_custom_thread_creation_options)
Set custom thread creation options for global thread pools.
OrtStatus * AddSessionConfigEntry(OrtSessionOptions *options, const char *config_key, const char *config_value)
Set a session configuration entry as a pair of strings.
OrtStatus * SetGlobalDenormalAsZero(OrtThreadingOptions *tp_options)
Set threading flush-to-zero and denormal-as-zero.
void(* ClearBoundInputs)(OrtIoBinding *binding_ptr) __attribute__((nonnull))
Clears any previously set Inputs for an OrtIoBinding.
Definition onnxruntime_c_api.h:2394
OrtStatus * KernelInfo_GetInputTypeInfo(const OrtKernelInfo *info, size_t index, OrtTypeInfo **type_info)
Get the type information for a OrtKernelInfo's input.
OrtStatus * KernelInfoGetAttribute_string(const OrtKernelInfo *info, const char *name, char *out, size_t *size)
Fetch a string stored as an attribute in the graph node.
OrtStatus * GetSparseTensorIndicesTypeShape(const OrtValue *ort_value, enum OrtSparseIndicesFormat indices_format, OrtTensorTypeAndShapeInfo **out)
Returns data type, shape for the type of indices specified by indices_format.
OrtStatus * SessionOptionsAppendExecutionProvider_MIGraphX(OrtSessionOptions *options, const OrtMIGraphXProviderOptions *migraphx_options)
Append MIGraphX provider to session options.
OrtStatus * RunOptionsSetRunLogVerbosityLevel(OrtRunOptions *options, int log_verbosity_level)
Set per-run log verbosity level.
OrtStatus * AddInitializer(OrtSessionOptions *options, const char *name, const OrtValue *val)
Add a pre-allocated initializer to a session.
OrtStatus * CreateEnv(OrtLoggingLevel log_severity_level, const char *logid, OrtEnv **out)
Create an OrtEnv.
OrtStatus * UseCooIndices(OrtValue *ort_value, int64_t *indices_data, size_t indices_num)
OrtStatus * GetTensorMutableData(OrtValue *value, void **out)
Get a pointer to the raw data inside a tensor.
OrtStatus * SessionOptionsAppendExecutionProvider_OpenVINO(OrtSessionOptions *options, const OrtOpenVINOProviderOptions *provider_options)
Append OpenVINO execution provider to the session options.
OrtStatus * IsSparseTensor(const OrtValue *value, int *out)
Sets *out to 1 iff an OrtValue is a SparseTensor, and 0 otherwise.
OrtStatus * GetTensorElementType(const OrtTensorTypeAndShapeInfo *info, enum ONNXTensorElementDataType *out)
Get element type in OrtTensorTypeAndShapeInfo.
OrtStatus * CreateSparseTensorAsOrtValue(OrtAllocator *allocator, const int64_t *dense_shape, size_t dense_shape_len, ONNXTensorElementDataType type, OrtValue **out)
Create an OrtValue with a sparse tensor that is empty.
OrtStatus * FillStringTensorElement(OrtValue *value, const char *s, size_t index)
Set a single string in a string tensor.
OrtStatus * CreateTensorWithDataAsOrtValue(const OrtMemoryInfo *info, void *p_data, size_t p_data_len, const int64_t *shape, size_t shape_len, ONNXTensorElementDataType type, OrtValue **out)
Create a tensor backed by a user supplied buffer.
OrtStatus * ModelMetadataGetGraphDescription(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char **value)
OrtStatus * UpdateDnnlProviderOptions(OrtDnnlProviderOptions *dnnl_options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Set options in a oneDNN Execution Provider.
OrtStatus * GetStringTensorElementLength(const OrtValue *value, size_t index, size_t *out)
Get the length of a single string in a string tensor.
void(* MemoryInfoGetDeviceType)(const OrtMemoryInfo *ptr, OrtMemoryInfoDeviceType *out)
Definition onnxruntime_c_api.h:3757
OrtStatus * AddRunConfigEntry(OrtRunOptions *options, const char *config_key, const char *config_value)
Set a single run configuration entry as a pair of strings.
OrtStatus * GetBoundOutputValues(const OrtIoBinding *binding_ptr, OrtAllocator *allocator, OrtValue ***output, size_t *output_count)
Get the output OrtValue objects from an OrtIoBinding.
OrtStatus * ModelMetadataGetDomain(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char **value)
Get domain from an OrtModelMetadata.
OrtStatus * SetLanguageProjection(const OrtEnv *ort_env, OrtLanguageProjection projection)
Set language projection.
OrtStatus * FillStringTensor(OrtValue *value, const char *const *s, size_t s_len)
Set all strings at once in a string tensor.
OrtStatus * SetSessionLogId(OrtSessionOptions *options, const char *logid)
Set session log id.
OrtStatus * SessionOptionsAppendExecutionProvider_CUDA(OrtSessionOptions *options, const OrtCUDAProviderOptions *cuda_options)
Append CUDA provider to session options.
OrtStatus * AddExternalInitializers(OrtSessionOptions *options, const char *const *initializer_names, const OrtValue *const *initializers, size_t initializers_num)
Replace initialized Tensors with external data with the data provided in initializers.
OrtStatus * RegisterAllocator(OrtEnv *env, OrtAllocator *allocator)
Register a custom allocator.
OrtStatus * SetGlobalSpinControl(OrtThreadingOptions *tp_options, int allow_spinning)
Set global spin control options.
OrtStatus * MemoryInfoGetId(const OrtMemoryInfo *ptr, int *out)
Get the id from OrtMemoryInfo.
OrtStatus * KernelInfo_GetOutputName(const OrtKernelInfo *info, size_t index, char *out, size_t *size)
Get the name of a OrtKernelInfo's output.
OrtStatus * Logger_LogMessage(const OrtLogger *logger, OrtLoggingLevel log_severity_level, const char *message, const char *file_path, int line_number, const char *func_name)
Logs a message at the given severity level using the provided OrtLogger.
OrtStatus * CreateEnvWithCustomLogger(OrtLoggingFunction logging_function, void *logger_param, OrtLoggingLevel log_severity_level, const char *logid, OrtEnv **out)
Create an OrtEnv.
OrtStatus * UpdateCUDAProviderOptionsWithValue(OrtCUDAProviderOptionsV2 *cuda_options, const char *key, void *value)
OrtStatus * MemoryInfoGetName(const OrtMemoryInfo *ptr, const char **out)
Get name from OrtMemoryInfo.
OrtStatus * Logger_GetLoggingSeverityLevel(const OrtLogger *logger, OrtLoggingLevel *out)
Get the logging severity level of the OrtLogger.
OrtStatus * GetExecutionProviderApi(const char *provider_name, uint32_t version, const void **provider_api)
Get a pointer to the requested version of the Execution Provider specific API extensions to the OrtAp...
OrtStatus * KernelContext_GetOutputCount(const OrtKernelContext *context, size_t *out)
Used for custom operators, get the output count of a kernel.
OrtStatus * GetTensorShapeElementCount(const OrtTensorTypeAndShapeInfo *info, size_t *out)
Get total number of elements in a tensor shape from an OrtTensorTypeAndShapeInfo.
OrtStatus * CastTypeInfoToTensorInfo(const OrtTypeInfo *type_info, const OrtTensorTypeAndShapeInfo **out)
Get OrtTensorTypeAndShapeInfo from an OrtTypeInfo.
OrtStatus * GetOptionalContainedTypeInfo(const OrtOptionalTypeInfo *optional_type_info, OrtTypeInfo **out)
Get OrtTypeInfo for the allowed contained type from an OrtOptionalTypeInfo.
OrtStatus * CreateOp(const OrtKernelInfo *info, const char *op_name, const char *domain, int version, const char **type_constraint_names, const ONNXTensorElementDataType *type_constraint_values, int type_constraint_count, const OrtOpAttr *const *attr_values, int attr_count, int input_count, int output_count, OrtOp **ort_op)
: Create onnxruntime native operator
OrtStatus * MemoryInfoGetType(const OrtMemoryInfo *ptr, OrtAllocatorType *out)
Get the OrtAllocatorType from OrtMemoryInfo.
OrtStatus * HasValue(const OrtValue *value, int *out)
Sets out to 1 iff an optional type OrtValue has an element, 0 otherwise (OrtValue is None) Use this A...
OrtStatus * CreateEnvWithGlobalThreadPools(OrtLoggingLevel log_severity_level, const char *logid, const OrtThreadingOptions *tp_options, OrtEnv **out)
Create an OrtEnv.
OrtStatus * KernelContext_GetAllocator(const OrtKernelContext *context, const OrtMemoryInfo *mem_info, OrtAllocator **out)
Get Allocator from KernelContext for a specific memoryInfo. Please use C API ReleaseAllocator to rele...
OrtStatus * KernelInfoGetConstantInput_tensor(const OrtKernelInfo *info, size_t index, int *is_constant, const OrtValue **out)
Get a OrtValue tensor stored as a constant initializer in the graph node.
OrtStatus * GetCUDAProviderOptionsAsString(const OrtCUDAProviderOptionsV2 *cuda_options, OrtAllocator *allocator, char **ptr)
OrtStatus * UpdateCUDAProviderOptions(OrtCUDAProviderOptionsV2 *cuda_options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Set options in a CUDA Execution Provider.
OrtStatus * CopyKernelInfo(const OrtKernelInfo *info, OrtKernelInfo **info_copy)
OrtStatus * GetTensorRTProviderOptionsAsString(const OrtTensorRTProviderOptionsV2 *tensorrt_options, OrtAllocator *allocator, char **ptr)
Get serialized TensorRT provider options string.
OrtStatus * SessionOptionsSetCustomThreadCreationOptions(OrtSessionOptions *options, void *ort_custom_thread_creation_options)
Set creation options for custom thread.
OrtStatus * GetDimensionsCount(const OrtTensorTypeAndShapeInfo *info, size_t *out)
Get dimension count in OrtTensorTypeAndShapeInfo.
void(* ReleaseROCMProviderOptions)(OrtROCMProviderOptions *input)
Release an OrtROCMProviderOptions.
Definition onnxruntime_c_api.h:4336
OrtStatus * UpdateROCMProviderOptions(OrtROCMProviderOptions *rocm_options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Set options in a ROCm Execution Provider.
OrtStatus * KernelInfo_GetInputName(const OrtKernelInfo *info, size_t index, char *out, size_t *size)
Get the name of a OrtKernelInfo's input.
OrtStatus * RegisterCustomOpsLibrary(OrtSessionOptions *options, const char *library_path, void **library_handle)
OrtStatus * SetCurrentGpuDeviceId(int device_id)
Set current GPU device ID.
OrtStatus * GetOnnxTypeFromTypeInfo(const OrtTypeInfo *type_info, enum ONNXType *out)
Get ONNXType from OrtTypeInfo.
OrtStatus * GetDenotationFromTypeInfo(const OrtTypeInfo *type_info, const char **const denotation, size_t *len)
Get denotation from type information.
OrtStatus * KernelContext_ParallelFor(const OrtKernelContext *context, void(*fn)(void *, size_t), size_t total, size_t num_batch, void *usr_data)
void(* ReleaseCANNProviderOptions)(OrtCANNProviderOptions *input)
Release an OrtCANNProviderOptions.
Definition onnxruntime_c_api.h:3751
OrtStatus * SetGlobalInterOpNumThreads(OrtThreadingOptions *tp_options, int inter_op_num_threads)
Set global inter-op thread count.
OrtStatus * CloneSessionOptions(const OrtSessionOptions *in_options, OrtSessionOptions **out_options)
Create a copy of an existing OrtSessionOptions.
OrtStatus * GetSessionConfigEntry(const OrtSessionOptions *options, const char *config_key, char *config_value, size_t *size)
Get a session configuration value.
OrtStatus * SessionOptionsAppendExecutionProvider_TensorRT_V2(OrtSessionOptions *options, const OrtTensorRTProviderOptionsV2 *tensorrt_options)
Append TensorRT execution provider to the session options.
OrtStatus * AddFreeDimensionOverride(OrtSessionOptions *options, const char *dim_denotation, int64_t dim_value)
Override session symbolic dimensions.
OrtStatus * KernelContext_GetOutput(OrtKernelContext *context, size_t index, const int64_t *dim_values, size_t dim_count, OrtValue **out)
Used for custom operators, get an output of a kernel.
OrtStatus * EnableTelemetryEvents(const OrtEnv *env)
Enable Telemetry.
OrtStatus * CreateMemoryInfo(const char *name, enum OrtAllocatorType type, int id, enum OrtMemType mem_type, OrtMemoryInfo **out)
Create an OrtMemoryInfo.
OrtStatus * SessionOptionsAppendExecutionProvider_ROCM(OrtSessionOptions *options, const OrtROCMProviderOptions *rocm_options)
Append ROCM execution provider to the session options.
OrtStatus * SessionGetInputTypeInfo(const OrtSession *session, size_t index, OrtTypeInfo **type_info)
Get input type information.
OrtStatus * GetSymbolicDimensions(const OrtTensorTypeAndShapeInfo *info, const char *dim_params[], size_t dim_params_length)
Get symbolic dimension names in OrtTensorTypeAndShapeInfo.
OrtStatus * SessionOptionsAppendExecutionProvider_OpenVINO_V2(OrtSessionOptions *options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Append OpenVINO execution provider to the session options.
OrtStatus * GetStringTensorDataLength(const OrtValue *value, size_t *len)
Get total byte length for all strings in a string tensor.
OrtStatus * KernelContext_GetInputCount(const OrtKernelContext *context, size_t *out)
Used for custom operators, get the input count of a kernel.
OrtStatus * BindOutputToDevice(OrtIoBinding *binding_ptr, const char *name, const OrtMemoryInfo *mem_info_ptr)
Bind an OrtIoBinding output to a device.
OrtStatus * SessionOptionsAppendExecutionProvider(OrtSessionOptions *options, const char *provider_name, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
: Append execution provider to the session options.
OrtStatus * SetSessionGraphOptimizationLevel(OrtSessionOptions *options, GraphOptimizationLevel graph_optimization_level)
Set the optimization level to apply when loading a graph.
OrtStatus * ModelMetadataGetDescription(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char **value)
Get description from an OrtModelMetadata.
OrtStatus * CreateCANNProviderOptions(OrtCANNProviderOptions **out)
Create an OrtCANNProviderOptions.
OrtStatus * ReadOpAttr(const OrtOpAttr *op_attr, OrtOpAttrType type, void *data, size_t len, size_t *out)
OrtStatus * DisablePerSessionThreads(OrtSessionOptions *options)
Use global thread pool on a session.
OrtStatus * SetDimensions(OrtTensorTypeAndShapeInfo *info, const int64_t *dim_values, size_t dim_count)
Set shape information in OrtTensorTypeAndShapeInfo.
OrtStatus * SetInterOpNumThreads(OrtSessionOptions *options, int inter_op_num_threads)
Sets the number of threads used to parallelize the execution of the graph.
OrtStatus * CustomOpDomain_Add(OrtCustomOpDomain *custom_op_domain, const OrtCustomOp *op)
Add a custom op to a custom op domain.
OrtStatus * GetSequenceElementType(const OrtSequenceTypeInfo *sequence_type_info, OrtTypeInfo **type_info)
Get element type from an OrtSequenceTypeInfo.
OrtStatus * RunOptionsGetRunLogVerbosityLevel(const OrtRunOptions *options, int *log_verbosity_level)
Get per-run log verbosity level.
OrtStatus * FillSparseTensorCsr(OrtValue *ort_value, const OrtMemoryInfo *data_mem_info, const int64_t *values_shape, size_t values_shape_len, const void *values, const int64_t *inner_indices_data, size_t inner_indices_num, const int64_t *outer_indices_data, size_t outer_indices_num)
OrtStatus * CreateAndRegisterAllocator(OrtEnv *env, const OrtMemoryInfo *mem_info, const OrtArenaCfg *arena_cfg)
Create an allocator and register it with the OrtEnv.
OrtStatus * CreateCpuMemoryInfo(enum OrtAllocatorType type, enum OrtMemType mem_type, OrtMemoryInfo **out)
Create an OrtMemoryInfo for CPU memory.
OrtStatus * AddCustomOpDomain(OrtSessionOptions *options, OrtCustomOpDomain *custom_op_domain)
Add custom op domain to a session options.
OrtStatus * KernelInfo_GetOutputTypeInfo(const OrtKernelInfo *info, size_t index, OrtTypeInfo **type_info)
Get the type information for a OrtKernelInfo's output.
OrtStatus * KernelContext_GetInput(const OrtKernelContext *context, size_t index, const OrtValue **out)
Used for custom operators, get an input of a kernel.
OrtStatus * CreateEnvWithCustomLoggerAndGlobalThreadPools(OrtLoggingFunction logging_function, void *logger_param, OrtLoggingLevel log_severity_level, const char *logid, const struct OrtThreadingOptions *tp_options, OrtEnv **out)
OrtStatus * DisableTelemetryEvents(const OrtEnv *env)
Disable Telemetry.
OrtStatus * KernelInfo_GetOutputCount(const OrtKernelInfo *info, size_t *out)
Get the number of outputs from OrtKernelInfo.
OrtStatus * ShapeInferContext_GetInputCount(const OrtShapeInferContext *context, size_t *out)
OrtStatus * ModelMetadataGetGraphName(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char **value)
Get graph name from an OrtModelMetadata.
OrtStatus * CreateROCMProviderOptions(OrtROCMProviderOptions **out)
Create an OrtROCMProviderOptions.
OrtStatus * ModelMetadataLookupCustomMetadataMap(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, const char *key, char **value)
Return data for a key in the custom metadata map in an OrtModelMetadata.
OrtStatus * RunOptionsSetRunLogSeverityLevel(OrtRunOptions *options, int log_severity_level)
Set per-run log severity level.
OrtStatus * GetCUDAProviderOptionsByName(const OrtCUDAProviderOptionsV2 *cuda_options, const char *key, void **ptr)
OrtStatus * SetSessionExecutionMode(OrtSessionOptions *options, ExecutionMode execution_mode)
Set execution mode.
OrtStatus * SessionGetInputName(const OrtSession *session, size_t index, OrtAllocator *allocator, char **value)
Get input name.
OrtStatus * GetDnnlProviderOptionsAsString(const OrtDnnlProviderOptions *dnnl_options, OrtAllocator *allocator, char **ptr)
OrtStatus * CreateRunOptions(OrtRunOptions **out)
Create an OrtRunOptions.
OrtStatus * RunOptionsGetRunTag(const OrtRunOptions *options, const char **run_tag)
Get per-run tag.
OrtStatus * CreateCustomOpDomain(const char *domain, OrtCustomOpDomain **out)
Create a custom op domain.
OrtStatus * ModelMetadataGetCustomMetadataMapKeys(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char ***keys, int64_t *num_keys)
const char *(* GetErrorMessage)(const OrtStatus *status) __attribute__((nonnull))
Get error string from OrtStatus.
Definition onnxruntime_c_api.h:747
OrtStatus * IsTensor(const OrtValue *value, int *out)
Return if an OrtValue is a tensor type.
OrtStatus * AllocatorFree(OrtAllocator *ort_allocator, void *p)
Calls OrtAllocator::Free function.
OrtStatus * GetMapValueType(const OrtMapTypeInfo *map_type_info, OrtTypeInfo **type_info)
Get the value type from an OrtMapTypeInfo.
OrtStatus * CreateSessionFromArray(const OrtEnv *env, const void *model_data, size_t model_data_length, const OrtSessionOptions *options, OrtSession **out)
Create an OrtSession from memory.
OrtStatus * CreateArenaCfgV2(const char *const *arena_config_keys, const size_t *arena_config_values, size_t num_keys, OrtArenaCfg **out)
Create an OrtArenaCfg.
OrtStatus * GetAllocatorWithDefaultOptions(OrtAllocator **out)
Get the default allocator.
OrtStatus * CreateSession(const OrtEnv *env, const char *model_path, const OrtSessionOptions *options, OrtSession **out)
Create an OrtSession from a model file.
OrtStatus * SessionOptionsAppendExecutionProvider_Dnnl(OrtSessionOptions *options, const OrtDnnlProviderOptions *dnnl_options)
Append dnnl provider to session options.
OrtStatus * CreateArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk, OrtArenaCfg **out)
OrtStatus * SessionGetInputCount(const OrtSession *session, size_t *out)
Get input count for a session.
OrtStatus * GetValue(const OrtValue *value, int index, OrtAllocator *allocator, OrtValue **out)
Get non tensor data from an OrtValue.
OrtStatus * ShapeInferContext_GetAttribute(const OrtShapeInferContext *context, const char *attr_name, const OrtOpAttr **attr)
OrtStatus * GetSparseTensorIndices(const OrtValue *ort_value, enum OrtSparseIndicesFormat indices_format, size_t *num_indices, const void **indices)
Returns indices data for the type of the indices specified by indices_format.
OrtStatus * EnableProfiling(OrtSessionOptions *options, const char *profile_file_prefix)
Enable profiling for a session.
OrtStatus * SetUserLoggingFunction(OrtSessionOptions *options, OrtLoggingFunction user_logging_function, void *user_logging_param)
Set user logging function.
OrtStatus * GetStringTensorElement(const OrtValue *value, size_t s_len, size_t index, void *s)
Get a single string from a string tensor.
OrtStatus * GetTensorTypeAndShape(const OrtValue *value, OrtTensorTypeAndShapeInfo **out)
Get type and shape information from a tensor OrtValue.
OrtStatus * BindInput(OrtIoBinding *binding_ptr, const char *name, const OrtValue *val_ptr)
Bind an OrtValue to an OrtIoBinding input.
OrtStatus * GetResizedStringTensorElementBuffer(OrtValue *value, size_t index, size_t length_in_bytes, char **buffer)
Set a single string in a string tensor Do not zero terminate the string data.
OrtStatus * DisableCpuMemArena(OrtSessionOptions *options)
Disable the memory arena on CPU.
void(* ClearBoundOutputs)(OrtIoBinding *binding_ptr) __attribute__((nonnull))
Clears any previously set Outputs for an OrtIoBinding.
Definition onnxruntime_c_api.h:2398
OrtStatus * SetSymbolicDimensions(OrtTensorTypeAndShapeInfo *info, const char *dim_params[], size_t dim_params_length)
OrtStatus * SessionOptionsAppendExecutionProvider_CANN(OrtSessionOptions *options, const OrtCANNProviderOptions *cann_options)
Append CANN provider to session options.
OrtStatus * MemoryInfoGetMemType(const OrtMemoryInfo *ptr, OrtMemType *out)
Get the OrtMemType from OrtMemoryInfo.
OrtStatus * AllocatorGetInfo(const OrtAllocator *ort_allocator, const struct OrtMemoryInfo **out)
Calls OrtAllocator::Info function.
OrtStatus * CompareMemoryInfo(const OrtMemoryInfo *info1, const OrtMemoryInfo *info2, int *out)
Compare OrtMemoryInfo objects for equality.
OrtStatus * GetAvailableProviders(char ***out_ptr, int *provider_length)
Get the names of all available providers.
OrtStatus * SynchronizeBoundInputs(OrtIoBinding *binding_ptr)
Synchronize bound inputs. The call may be necessary for some providers, such as cuda,...
OrtStatus * GetOpaqueValue(const char *domain_name, const char *type_name, const OrtValue *in, void *data_container, size_t data_container_size)
Get internal data from an opaque (custom user defined type) OrtValue.
OrtStatus * AllocatorAlloc(OrtAllocator *ort_allocator, size_t size, void **out)
Calls OrtAllocator::Alloc function.
OrtStatus * RunAsync(OrtSession *session, const OrtRunOptions *run_options, const char *const *input_names, const OrtValue *const *input, size_t input_len, const char *const *output_names, size_t output_names_len, OrtValue **output, RunAsyncCallbackFn run_async_callback, void *user_data)
Run the model asynchronously in a thread owned by intra op thread pool.
OrtStatus * GetTensorRTProviderOptionsByName(const OrtTensorRTProviderOptionsV2 *tensorrt_options, const char *key, void **ptr)
OrtStatus * RegisterCustomOpsLibrary_V2(OrtSessionOptions *options, const char *library_name)
Register custom ops from a shared library.
OrtStatus * SessionGetOverridableInitializerName(const OrtSession *session, size_t index, OrtAllocator *allocator, char **value)
Get overridable initializer name.
OrtStatus * GetROCMProviderOptionsAsString(const OrtROCMProviderOptions *rocm_options, OrtAllocator *allocator, char **ptr)
OrtStatus * UnregisterAllocator(OrtEnv *env, const OrtMemoryInfo *mem_info)
Unregister a custom allocator.
OrtStatus * DisableMemPattern(OrtSessionOptions *options)
Disable the memory pattern optimization.
OrtStatus * UseBlockSparseIndices(OrtValue *ort_value, const int64_t *indices_shape, size_t indices_shape_len, int32_t *indices_data)
OrtStatus *(* CreateStatus)(OrtErrorCode code, const char *msg) __attribute__((nonnull))
Create an OrtStatus from a null terminated string.
Definition onnxruntime_c_api.h:733
OrtStatus * RunWithBinding(OrtSession *session, const OrtRunOptions *run_options, const OrtIoBinding *binding_ptr)
Run a model using Io Bindings for the inputs & outputs.
OrtStatus * CreateDnnlProviderOptions(OrtDnnlProviderOptions **out)
Create an OrtDnnlProviderOptions.
OrtStatus * GetMapKeyType(const OrtMapTypeInfo *map_type_info, enum ONNXTensorElementDataType *out)
Get key type from an OrtMapTypeInfo.
OrtStatus * RunOptionsGetRunLogSeverityLevel(const OrtRunOptions *options, int *log_severity_level)
Get per-run log severity level.
OrtStatus * CastTypeInfoToOptionalTypeInfo(const OrtTypeInfo *type_info, const OrtOptionalTypeInfo **out)
Get Optional Type information from an OrtTypeInfo.
OrtStatus * SessionGetModelMetadata(const OrtSession *session, OrtModelMetadata **out)
Get OrtModelMetadata from an OrtSession.
OrtStatus * GetCurrentGpuDeviceId(int *device_id)
Get current GPU device ID.
OrtStatus * SessionGetOutputTypeInfo(const OrtSession *session, size_t index, OrtTypeInfo **type_info)
Get output type information.
OrtStatus * EnableOrtCustomOps(OrtSessionOptions *options)
Enable custom operators.
OrtStatus * UpdateEnvWithCustomLogLevel(OrtEnv *ort_env, OrtLoggingLevel log_severity_level)
OrtStatus * CreateValue(const OrtValue *const *in, size_t num_values, enum ONNXType value_type, OrtValue **out)
Create a map or sequence OrtValue.
OrtStatus * RegisterCustomOpsUsingFunction(OrtSessionOptions *options, const char *registration_func_name)
Register custom ops by calling a RegisterCustomOpsFn function.
OrtStatus * RunOptionsSetTerminate(OrtRunOptions *options)
Set terminate flag.
OrtStatus * SetSessionLogVerbosityLevel(OrtSessionOptions *options, int session_log_verbosity_level)
Set session log verbosity level.
OrtStatus * SetSessionLogSeverityLevel(OrtSessionOptions *options, int session_log_severity_level)
Set session log severity level.
OrtStatus * CreateThreadingOptions(OrtThreadingOptions **out)
Create an OrtThreadingOptions.
OrtStatus * UseCsrIndices(OrtValue *ort_value, int64_t *inner_data, size_t inner_num, int64_t *outer_data, size_t outer_num)
OrtStatus * SessionGetOverridableInitializerCount(const OrtSession *session, size_t *out)
Get overridable initializer count.
OrtStatus * KernelContext_GetResource(const OrtKernelContext *context, int resouce_version, int resource_id, void **resource)
OrtStatus * CreateSessionWithPrepackedWeightsContainer(const OrtEnv *env, const char *model_path, const OrtSessionOptions *options, OrtPrepackedWeightsContainer *prepacked_weights_container, OrtSession **out)
Create session with prepacked weights container.
OrtStatus * KernelInfo_GetLogger(const OrtKernelInfo *info, const OrtLogger **logger)
Get the session logger from OrtKernelInfo.
OrtStatus * UpdateTensorRTProviderOptions(OrtTensorRTProviderOptionsV2 *tensorrt_options, const char *const *provider_options_keys, const char *const *provider_options_values, size_t num_keys)
Set options in a TensorRT Execution Provider.
OrtStatus * KernelInfoGetAttribute_tensor(const OrtKernelInfo *info, const char *name, OrtAllocator *allocator, OrtValue **out)
Get a OrtValue tensor stored as an attribute in the graph node.
OrtStatus * EnableMemPattern(OrtSessionOptions *options)
Enable the memory pattern optimization.
OrtStatus * SetOptimizedModelFilePath(OrtSessionOptions *options, const char *optimized_model_filepath)
Set filepath to save optimized model after graph level transformations.
OrtStatus * CreateAllocator(const OrtSession *session, const OrtMemoryInfo *mem_info, OrtAllocator **out)
Create an allocator for an OrtSession following an OrtMemoryInfo.
OrtStatus * SynchronizeBoundOutputs(OrtIoBinding *binding_ptr)
Synchronize bound outputs. The call may be necessary for some providers, such as cuda,...
OrtStatus * SessionGetOutputCount(const OrtSession *session, size_t *out)
Get output count for a session.
OrtStatus * CastTypeInfoToSequenceTypeInfo(const OrtTypeInfo *type_info, const OrtSequenceTypeInfo **out)
Cast OrtTypeInfo to an OrtSequenceTypeInfo.
OrtStatus * Run(OrtSession *session, const OrtRunOptions *run_options, const char *const *input_names, const OrtValue *const *inputs, size_t input_len, const char *const *output_names, size_t output_names_len, OrtValue **outputs)
Run the model in an OrtSession.
OrtStatus * GetValueType(const OrtValue *value, enum ONNXType *out)
Get ONNXType of an OrtValue.
OrtStatus * ShapeInferContext_GetInputTypeShape(const OrtShapeInferContext *context, size_t index, OrtTensorTypeAndShapeInfo **info)
OrtStatus * KernelInfo_GetNodeName(const OrtKernelInfo *info, char *out, size_t *size)
Get the graph node name from OrtKernelInfo.
OrtStatus * CreateTensorRTProviderOptions(OrtTensorRTProviderOptionsV2 **out)
Create an OrtTensorRTProviderOptionsV2.
OrtStatus * GetDimensions(const OrtTensorTypeAndShapeInfo *info, int64_t *dim_values, size_t dim_values_length)
Get dimensions in OrtTensorTypeAndShapeInfo.
OrtStatus * SessionGetProfilingStartTimeNs(const OrtSession *session, uint64_t *out)
Return the time that profiling was started.
OrtStatus * RunOptionsUnsetTerminate(OrtRunOptions *options)
Clears the terminate flag.
OrtStatus * CreateOpaqueValue(const char *domain_name, const char *type_name, const void *data_container, size_t data_container_size, OrtValue **out)
Create an opaque (custom user defined type) OrtValue.
OrtStatus * GetSparseTensorValuesTypeAndShape(const OrtValue *ort_value, OrtTensorTypeAndShapeInfo **out)
Returns data type and shape of sparse tensor values (nnz) iff OrtValue contains a SparseTensor.
void(* ReleaseTensorRTProviderOptions)(OrtTensorRTProviderOptionsV2 *input)
Release an OrtTensorRTProviderOptionsV2.
Definition onnxruntime_c_api.h:2953
OrtStatus * ReleaseAvailableProviders(char **ptr, int providers_length)
Release data from OrtApi::GetAvailableProviders. This API will never fail so you can rely on it in a ...
OrtStatus * RunOptionsSetRunTag(OrtRunOptions *options, const char *run_tag)
Set per-run tag.
OrtStatus * CreateIoBinding(OrtSession *session, OrtIoBinding **out)
Create an OrtIoBinding instance.
OrtStatus * SetGlobalIntraOpNumThreads(OrtThreadingOptions *tp_options, int intra_op_num_threads)
Set global intra-op thread count.
OrtStatus * CreateOpAttr(const char *name, const void *data, int len, OrtOpAttrType type, OrtOpAttr **op_attr)
: Create attribute of onnxruntime operator
OrtStatus * FillSparseTensorBlockSparse(OrtValue *ort_value, const OrtMemoryInfo *data_mem_info, const int64_t *values_shape, size_t values_shape_len, const void *values, const int64_t *indices_shape_data, size_t indices_shape_len, const int32_t *indices_data)
OrtStatus * ModelMetadataGetVersion(const OrtModelMetadata *model_metadata, int64_t *value)
Get version number from an OrtModelMetadata.
OrtStatus * GetStringTensorContent(const OrtValue *value, void *s, size_t s_len, size_t *offsets, size_t offsets_len)
Get all strings from a string tensor.
OrtStatus * GetBoundOutputNames(const OrtIoBinding *binding_ptr, OrtAllocator *allocator, char **buffer, size_t **lengths, size_t *count)
Get the names of an OrtIoBinding's outputs.
OrtStatus * CreateTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo **out)
Create an OrtTensorTypeAndShapeInfo object.
OrtStatus * FillSparseTensorCoo(OrtValue *ort_value, const OrtMemoryInfo *data_mem_info, const int64_t *values_shape, size_t values_shape_len, const void *values, const int64_t *indices_data, size_t indices_num)
OrtStatus * SessionEndProfiling(OrtSession *session, OrtAllocator *allocator, char **out)
End profiling and return filename of the profile data.
OrtStatus * ModelMetadataGetProducerName(const OrtModelMetadata *model_metadata, OrtAllocator *allocator, char **value)
Get producer name from an OrtModelMetadata.
OrtStatus * SessionOptionsSetCustomCreateThreadFn(OrtSessionOptions *options, OrtCustomCreateThreadFn ort_custom_create_thread_fn)
Set custom thread creation function.
OrtStatus * SetGlobalCustomCreateThreadFn(OrtThreadingOptions *tp_options, OrtCustomCreateThreadFn ort_custom_create_thread_fn)
Set custom thread creation function for global thread pools.
OrtStatus * SessionOptionsAppendExecutionProvider_CUDA_V2(OrtSessionOptions *options, const OrtCUDAProviderOptionsV2 *cuda_options)
Append CUDA execution provider to the session options.
OrtStatus * CreateTensorAsOrtValue(OrtAllocator *allocator, const int64_t *shape, size_t shape_len, ONNXTensorElementDataType type, OrtValue **out)
Create a tensor.
void(* ReleaseCUDAProviderOptions)(OrtCUDAProviderOptionsV2 *input)
Release an OrtCUDAProviderOptionsV2.
Definition onnxruntime_c_api.h:3456
OrtStatus * KernelInfoGetAttribute_int64(const OrtKernelInfo *info, const char *name, int64_t *out)
Fetch a 64-bit int stored as an attribute in the graph node.
OrtErrorCode(* GetErrorCode)(const OrtStatus *status) __attribute__((nonnull))
Get OrtErrorCode from OrtStatus.
Definition onnxruntime_c_api.h:740
OrtStatus * SetTensorElementType(OrtTensorTypeAndShapeInfo *info, enum ONNXTensorElementDataType type)
Set element type in OrtTensorTypeAndShapeInfo.
OrtStatus * BindOutput(OrtIoBinding *binding_ptr, const char *name, const OrtValue *val_ptr)
Bind an OrtValue to an OrtIoBinding output.
OrtStatus * GetSparseTensorValues(const OrtValue *ort_value, const void **out)
Returns numeric data for sparse tensor values (nnz). For string values use GetStringTensor*().
CUDA Provider Options.
Definition onnxruntime_c_api.h:401
int tunable_op_max_tuning_duration_ms
Max tuning duration time limit for each instance of TunableOp. Defaults to 0 to disable the limit.
Definition onnxruntime_c_api.h:480
int has_user_compute_stream
Flag indicating if there is a user provided compute stream Defaults to 0.
Definition onnxruntime_c_api.h:454
int do_copy_in_default_stream
Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA E...
Definition onnxruntime_c_api.h:449
void * user_compute_stream
User provided compute stream. If provided, please set has_user_compute_stream to 1.
Definition onnxruntime_c_api.h:459
int tunable_op_enable
Enable TunableOp for using. Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by d...
Definition onnxruntime_c_api.h:469
size_t gpu_mem_limit
CUDA memory limit (To use all possible memory pass in maximum size_t) Defaults to SIZE_MAX.
Definition onnxruntime_c_api.h:432
int arena_extend_strategy
Strategy used to grow the memory arena 0 = kNextPowerOfTwo 1 = kSameAsRequested Defaults to 0.
Definition onnxruntime_c_api.h:440
OrtCUDAProviderOptions()
Definition onnxruntime_c_api.h:403
OrtArenaCfg * default_memory_arena_cfg
CUDA memory arena configuration parameters.
Definition onnxruntime_c_api.h:463
int tunable_op_tuning_enable
Enable TunableOp for tuning. Set it to 1/0 to enable/disable TunableOp tuning. Otherwise,...
Definition onnxruntime_c_api.h:475
OrtCudnnConvAlgoSearch cudnn_conv_algo_search
CUDA Convolution algorithm search configuration. See enum OrtCudnnConvAlgoSearch for more details....
Definition onnxruntime_c_api.h:426
int device_id
CUDA device Id Defaults to 0.
Definition onnxruntime_c_api.h:420
Definition onnxruntime_c_api.h:686
char __place_holder
Definition onnxruntime_c_api.h:687
Definition onnxruntime_c_api.h:4599
int(* GetVariadicInputHomogeneity)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4645
OrtCustomOpInputOutputCharacteristic(* GetOutputCharacteristic)(const struct OrtCustomOp *op, size_t index)
Definition onnxruntime_c_api.h:4629
size_t(* GetInputTypeCount)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4617
int(* GetVariadicOutputMinArity)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4649
int(* GetStartVersion)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4667
const char *(* GetName)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4610
size_t(* GetOutputTypeCount)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4619
void(* KernelDestroy)(void *op_kernel)
Definition onnxruntime_c_api.h:4625
int(* GetVariadicOutputHomogeneity)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4654
OrtMemType(* GetInputMemoryType)(const struct OrtCustomOp *op, size_t index)
Definition onnxruntime_c_api.h:4636
void *(* CreateKernel)(const struct OrtCustomOp *op, const OrtApi *api, const OrtKernelInfo *info)
Definition onnxruntime_c_api.h:4606
uint32_t version
Definition onnxruntime_c_api.h:4600
ONNXTensorElementDataType(* GetInputType)(const struct OrtCustomOp *op, size_t index)
Definition onnxruntime_c_api.h:4616
OrtCustomOpInputOutputCharacteristic(* GetInputCharacteristic)(const struct OrtCustomOp *op, size_t index)
Definition onnxruntime_c_api.h:4628
const char *(* GetExecutionProviderType)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4613
ONNXTensorElementDataType(* GetOutputType)(const struct OrtCustomOp *op, size_t index)
Definition onnxruntime_c_api.h:4618
int(* GetVariadicInputMinArity)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4640
OrtStatusPtr(* InferOutputShapeFn)(const struct OrtCustomOp *op, OrtShapeInferContext *)
Definition onnxruntime_c_api.h:4664
int(* GetEndVersion)(const struct OrtCustomOp *op)
Definition onnxruntime_c_api.h:4668
OrtStatusPtr(* CreateKernelV2)(const struct OrtCustomOp *op, const OrtApi *api, const OrtKernelInfo *info, void **kernel)
Definition onnxruntime_c_api.h:4657
OrtStatusPtr(* KernelComputeV2)(void *op_kernel, OrtKernelContext *context)
Definition onnxruntime_c_api.h:4662
void(* KernelCompute)(void *op_kernel, OrtKernelContext *context)
Definition onnxruntime_c_api.h:4624
MIGraphX Provider Options.
Definition onnxruntime_c_api.h:605
int migraphx_int8_enable
Definition onnxruntime_c_api.h:608
int migraphx_fp16_enable
Definition onnxruntime_c_api.h:607
int device_id
Definition onnxruntime_c_api.h:606
int migraphx_use_native_calibration_table
Definition onnxruntime_c_api.h:609
const char * migraphx_int8_calibration_table_name
Definition onnxruntime_c_api.h:610
OpenVINO Provider Options.
Definition onnxruntime_c_api.h:617
unsigned char enable_opencl_throttling
0 = disabled, nonzero = enabled
Definition onnxruntime_c_api.h:638
size_t num_of_threads
0 = Use default number of threads
Definition onnxruntime_c_api.h:635
void * context
Definition onnxruntime_c_api.h:637
const char * cache_dir
Definition onnxruntime_c_api.h:636
const char * device_type
Device type string.
Definition onnxruntime_c_api.h:632
const char * device_id
Definition onnxruntime_c_api.h:634
unsigned char enable_npu_fast_compile
0 = disabled, nonzero = enabled
Definition onnxruntime_c_api.h:633
OrtOpenVINOProviderOptions()
Definition onnxruntime_c_api.h:619
unsigned char enable_dynamic_shapes
0 = disabled, nonzero = enabled
Definition onnxruntime_c_api.h:639
ROCM Provider Options.
Definition onnxruntime_c_api.h:488
int device_id
ROCM device Id Defaults to 0.
Definition onnxruntime_c_api.h:508
int tunable_op_max_tuning_duration_ms
Max tuning duration time limit for each instance of TunableOp. Defaults to 0 to disable the limit.
Definition onnxruntime_c_api.h:569
int do_copy_in_default_stream
Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM E...
Definition onnxruntime_c_api.h:536
OrtArenaCfg * default_memory_arena_cfg
ROCM memory arena configuration parameters.
Definition onnxruntime_c_api.h:550
size_t gpu_mem_limit
ROCM memory limit (To use all possible memory pass in maximum size_t) Defaults to SIZE_MAX.
Definition onnxruntime_c_api.h:519
OrtROCMProviderOptions()
Definition onnxruntime_c_api.h:490
int enable_hip_graph
Definition onnxruntime_c_api.h:552
int tunable_op_enable
Enable TunableOp for using. Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by d...
Definition onnxruntime_c_api.h:558
void * user_compute_stream
User provided compute stream. If provided, please set has_user_compute_stream to 1.
Definition onnxruntime_c_api.h:546
int arena_extend_strategy
Strategy used to grow the memory arena 0 = kNextPowerOfTwo 1 = kSameAsRequested Defaults to 0.
Definition onnxruntime_c_api.h:527
int tunable_op_tuning_enable
Enable TunableOp for tuning. Set it to 1/0 to enable/disable TunableOp tuning. Otherwise,...
Definition onnxruntime_c_api.h:564
int has_user_compute_stream
Flag indicating if there is a user provided compute stream Defaults to 0.
Definition onnxruntime_c_api.h:541
int miopen_conv_exhaustive_search
ROCM MIOpen Convolution algorithm exaustive search option. Defaults to 0 (false).
Definition onnxruntime_c_api.h:513
TensorRT Provider Options.
Definition onnxruntime_c_api.h:577
int trt_engine_cache_enable
Definition onnxruntime_c_api.h:591
void * user_compute_stream
Definition onnxruntime_c_api.h:580
int device_id
CUDA device id (0 = default device)
Definition onnxruntime_c_api.h:578
const char * trt_engine_cache_path
Definition onnxruntime_c_api.h:592
int trt_engine_decryption_enable
Definition onnxruntime_c_api.h:593
int trt_max_partition_iterations
Definition onnxruntime_c_api.h:581
size_t trt_max_workspace_size
Definition onnxruntime_c_api.h:583
int trt_dla_enable
Definition onnxruntime_c_api.h:588
const char * trt_int8_calibration_table_name
Definition onnxruntime_c_api.h:586
int has_user_compute_stream
Definition onnxruntime_c_api.h:579
int trt_dla_core
Definition onnxruntime_c_api.h:589
int trt_int8_use_native_calibration_table
Definition onnxruntime_c_api.h:587
int trt_min_subgraph_size
Definition onnxruntime_c_api.h:582
int trt_force_sequential_engine_build
Definition onnxruntime_c_api.h:595
int trt_dump_subgraphs
Definition onnxruntime_c_api.h:590
int trt_fp16_enable
Definition onnxruntime_c_api.h:584
const char * trt_engine_decryption_lib_path
Definition onnxruntime_c_api.h:594
int trt_int8_enable
Definition onnxruntime_c_api.h:585
The Training C API that holds onnxruntime training function pointers.
Definition onnxruntime_training_c_api.h:122