ort_sys/
lib.rs

1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![allow(clippy::type_complexity)]
5#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
6
7extern crate core;
8
9#[doc(hidden)]
10#[cfg(feature = "std")]
11pub mod internal;
12
13pub const ORT_API_VERSION: u32 = 22;
14
15pub use core::ffi::{c_char, c_int, c_ulong, c_ulonglong, c_ushort, c_void};
16
17#[cfg(target_os = "windows")]
18pub type ortchar = c_ushort;
19#[cfg(not(target_os = "windows"))]
20pub type ortchar = c_char;
21
22#[repr(i32)]
23#[doc = " Copied from TensorProto::DataType\n Currently, Ort doesn't support complex64, complex128"]
24#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
25pub enum ONNXTensorElementDataType {
26	ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED = 0,
27	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT = 1,
28	ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 = 2,
29	ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8 = 3,
30	ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 = 4,
31	ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16 = 5,
32	ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32 = 6,
33	ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64 = 7,
34	ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING = 8,
35	ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL = 9,
36	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16 = 10,
37	ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE = 11,
38	ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 = 12,
39	ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 = 13,
40	ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64 = 14,
41	ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128 = 15,
42	ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 = 16,
43	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN = 17,
44	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ = 18,
45	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2 = 19,
46	ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ = 20,
47	ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT4 = 21,
48	ONNX_TENSOR_ELEMENT_DATA_TYPE_INT4 = 22
49}
50#[repr(i32)]
51#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
52pub enum ONNXType {
53	ONNX_TYPE_UNKNOWN = 0,
54	ONNX_TYPE_TENSOR = 1,
55	ONNX_TYPE_SEQUENCE = 2,
56	ONNX_TYPE_MAP = 3,
57	ONNX_TYPE_OPAQUE = 4,
58	ONNX_TYPE_SPARSETENSOR = 5,
59	ONNX_TYPE_OPTIONAL = 6
60}
61#[repr(i32)]
62#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
63pub enum OrtSparseFormat {
64	ORT_SPARSE_UNDEFINED = 0,
65	ORT_SPARSE_COO = 1,
66	ORT_SPARSE_CSRC = 2,
67	ORT_SPARSE_BLOCK_SPARSE = 4
68}
69#[repr(i32)]
70#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
71pub enum OrtSparseIndicesFormat {
72	ORT_SPARSE_COO_INDICES = 0,
73	ORT_SPARSE_CSR_INNER_INDICES = 1,
74	ORT_SPARSE_CSR_OUTER_INDICES = 2,
75	ORT_SPARSE_BLOCK_SPARSE_INDICES = 3
76}
77#[repr(i32)]
78#[doc = " \\brief Logging severity levels\n\n In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show."]
79#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
80pub enum OrtLoggingLevel {
81	#[doc = "< Verbose informational messages (least severe)."]
82	ORT_LOGGING_LEVEL_VERBOSE = 0,
83	#[doc = "< Informational messages."]
84	ORT_LOGGING_LEVEL_INFO = 1,
85	#[doc = "< Warning messages."]
86	ORT_LOGGING_LEVEL_WARNING = 2,
87	#[doc = "< Error messages."]
88	ORT_LOGGING_LEVEL_ERROR = 3,
89	#[doc = "< Fatal error messages (most severe)."]
90	ORT_LOGGING_LEVEL_FATAL = 4
91}
92#[repr(i32)]
93#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
94pub enum OrtErrorCode {
95	ORT_OK = 0,
96	ORT_FAIL = 1,
97	ORT_INVALID_ARGUMENT = 2,
98	ORT_NO_SUCHFILE = 3,
99	ORT_NO_MODEL = 4,
100	ORT_ENGINE_ERROR = 5,
101	ORT_RUNTIME_EXCEPTION = 6,
102	ORT_INVALID_PROTOBUF = 7,
103	ORT_MODEL_LOADED = 8,
104	ORT_NOT_IMPLEMENTED = 9,
105	ORT_INVALID_GRAPH = 10,
106	ORT_EP_FAIL = 11
107}
108#[repr(i32)]
109#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
110pub enum OrtOpAttrType {
111	ORT_OP_ATTR_UNDEFINED = 0,
112	ORT_OP_ATTR_INT = 1,
113	ORT_OP_ATTR_INTS = 2,
114	ORT_OP_ATTR_FLOAT = 3,
115	ORT_OP_ATTR_FLOATS = 4,
116	ORT_OP_ATTR_STRING = 5,
117	ORT_OP_ATTR_STRINGS = 6
118}
119#[repr(C)]
120#[derive(Debug, Copy, Clone)]
121pub struct OrtEnv {
122	_unused: [u8; 0]
123}
124#[repr(C)]
125#[derive(Debug, Copy, Clone)]
126pub struct OrtStatus {
127	_unused: [u8; 0]
128}
129#[repr(C)]
130#[derive(Debug, Copy, Clone)]
131pub struct OrtMemoryInfo {
132	_unused: [u8; 0]
133}
134#[repr(C)]
135#[derive(Debug, Copy, Clone)]
136pub struct OrtIoBinding {
137	_unused: [u8; 0]
138}
139#[repr(C)]
140#[derive(Debug, Copy, Clone)]
141pub struct OrtSession {
142	_unused: [u8; 0]
143}
144#[repr(C)]
145#[derive(Debug, Copy, Clone)]
146pub struct OrtValue {
147	_unused: [u8; 0]
148}
149#[repr(C)]
150#[derive(Debug, Copy, Clone)]
151pub struct OrtRunOptions {
152	_unused: [u8; 0]
153}
154#[repr(C)]
155#[derive(Debug, Copy, Clone)]
156pub struct OrtTypeInfo {
157	_unused: [u8; 0]
158}
159#[repr(C)]
160#[derive(Debug, Copy, Clone)]
161pub struct OrtTensorTypeAndShapeInfo {
162	_unused: [u8; 0]
163}
164#[repr(C)]
165#[derive(Debug, Copy, Clone)]
166pub struct OrtMapTypeInfo {
167	_unused: [u8; 0]
168}
169#[repr(C)]
170#[derive(Debug, Copy, Clone)]
171pub struct OrtSequenceTypeInfo {
172	_unused: [u8; 0]
173}
174#[repr(C)]
175#[derive(Debug, Copy, Clone)]
176pub struct OrtOptionalTypeInfo {
177	_unused: [u8; 0]
178}
179#[repr(C)]
180#[derive(Debug, Copy, Clone)]
181pub struct OrtSessionOptions {
182	_unused: [u8; 0]
183}
184#[repr(C)]
185#[derive(Debug, Copy, Clone)]
186pub struct OrtCustomOpDomain {
187	_unused: [u8; 0]
188}
189#[repr(C)]
190#[derive(Debug, Copy, Clone)]
191pub struct OrtModelMetadata {
192	_unused: [u8; 0]
193}
194#[repr(C)]
195#[derive(Debug, Copy, Clone)]
196pub struct OrtThreadPoolParams {
197	_unused: [u8; 0]
198}
199#[repr(C)]
200#[derive(Debug, Copy, Clone)]
201pub struct OrtThreadingOptions {
202	_unused: [u8; 0]
203}
204#[repr(C)]
205#[derive(Debug, Copy, Clone)]
206pub struct OrtArenaCfg {
207	_unused: [u8; 0]
208}
209#[repr(C)]
210#[derive(Debug, Copy, Clone)]
211pub struct OrtPrepackedWeightsContainer {
212	_unused: [u8; 0]
213}
214#[repr(C)]
215#[derive(Debug, Copy, Clone)]
216pub struct OrtTensorRTProviderOptionsV2 {
217	_unused: [u8; 0]
218}
219#[repr(C)]
220#[derive(Debug, Copy, Clone)]
221pub struct OrtNvTensorRtRtxProviderOptions {
222	_unused: [u8; 0]
223}
224#[repr(C)]
225#[derive(Debug, Copy, Clone)]
226pub struct OrtCUDAProviderOptionsV2 {
227	_unused: [u8; 0]
228}
229#[repr(C)]
230#[derive(Debug, Copy, Clone)]
231pub struct OrtCANNProviderOptions {
232	_unused: [u8; 0]
233}
234#[repr(C)]
235#[derive(Debug, Copy, Clone)]
236pub struct OrtDnnlProviderOptions {
237	_unused: [u8; 0]
238}
239#[repr(C)]
240#[derive(Debug, Copy, Clone)]
241pub struct OrtOp {
242	_unused: [u8; 0]
243}
244#[repr(C)]
245#[derive(Debug, Copy, Clone)]
246pub struct OrtOpAttr {
247	_unused: [u8; 0]
248}
249#[repr(C)]
250#[derive(Debug, Copy, Clone)]
251pub struct OrtLogger {
252	_unused: [u8; 0]
253}
254#[repr(C)]
255#[derive(Debug, Copy, Clone)]
256pub struct OrtShapeInferContext {
257	_unused: [u8; 0]
258}
259#[repr(C)]
260#[derive(Debug, Copy, Clone)]
261pub struct OrtLoraAdapter {
262	_unused: [u8; 0]
263}
264#[repr(C)]
265#[derive(Debug, Copy, Clone)]
266pub struct OrtValueInfo {
267	_unused: [u8; 0]
268}
269#[repr(C)]
270#[derive(Debug, Copy, Clone)]
271pub struct OrtNode {
272	_unused: [u8; 0]
273}
274#[repr(C)]
275#[derive(Debug, Copy, Clone)]
276pub struct OrtGraph {
277	_unused: [u8; 0]
278}
279#[repr(C)]
280#[derive(Debug, Copy, Clone)]
281pub struct OrtModel {
282	_unused: [u8; 0]
283}
284#[repr(C)]
285#[derive(Debug, Copy, Clone)]
286pub struct OrtModelCompilationOptions {
287	_unused: [u8; 0]
288}
289#[repr(C)]
290#[derive(Debug, Copy, Clone)]
291pub struct OrtHardwareDevice {
292	_unused: [u8; 0]
293}
294#[repr(C)]
295#[derive(Debug, Copy, Clone)]
296pub struct OrtEpDevice {
297	_unused: [u8; 0]
298}
299#[repr(C)]
300#[derive(Debug, Copy, Clone)]
301pub struct OrtKeyValuePairs {
302	_unused: [u8; 0]
303}
304#[repr(transparent)]
305#[derive(Debug, Copy, Clone)]
306#[must_use = "statuses must be freed with `OrtApi::ReleaseStatus` if they are not null"]
307pub struct OrtStatusPtr(pub *mut OrtStatus);
308impl Default for OrtStatusPtr {
309	fn default() -> Self {
310		OrtStatusPtr(core::ptr::null_mut())
311	}
312}
313#[doc = " \\brief Memory allocation interface\n\n Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators.\n\n 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."]
314#[repr(C)]
315#[derive(Debug, Copy, Clone)]
316pub struct OrtAllocator {
317	#[doc = "< Must be initialized to ORT_API_VERSION"]
318	pub version: u32,
319	#[doc = "< Returns a pointer to an allocated block of `size` bytes"]
320	pub Alloc: Option<unsafe extern "system" fn(this_: *mut OrtAllocator, size: usize) -> *mut core::ffi::c_void>,
321	#[doc = "< Free a block of memory previously allocated with OrtAllocator::Alloc"]
322	pub Free: Option<unsafe extern "system" fn(this_: *mut OrtAllocator, p: *mut core::ffi::c_void)>,
323	#[doc = "< Return a pointer to an ::OrtMemoryInfo that describes this allocator"]
324	pub Info: Option<unsafe extern "system" fn(this_: *const OrtAllocator) -> *const OrtMemoryInfo>,
325	pub Reserve: Option<unsafe extern "system" fn(this_: *const OrtAllocator, size: usize) -> *mut core::ffi::c_void>
326}
327pub type OrtLoggingFunction = unsafe extern "system" fn(
328	param: *mut core::ffi::c_void,
329	severity: OrtLoggingLevel,
330	category: *const core::ffi::c_char,
331	logid: *const core::ffi::c_char,
332	code_location: *const core::ffi::c_char,
333	message: *const core::ffi::c_char
334);
335#[repr(i32)]
336#[doc = " \\brief Graph optimization level\n\n Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels\n for an in-depth understanding of the Graph Optimization Levels."]
337#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
338pub enum GraphOptimizationLevel {
339	ORT_DISABLE_ALL = 0,
340	ORT_ENABLE_BASIC = 1,
341	ORT_ENABLE_EXTENDED = 2,
342	ORT_ENABLE_ALL = 99
343}
344#[repr(i32)]
345#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
346pub enum ExecutionMode {
347	ORT_SEQUENTIAL = 0,
348	ORT_PARALLEL = 1
349}
350#[repr(i32)]
351#[doc = " \\brief Language projection identifiers\n /see OrtApi::SetLanguageProjection"]
352#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
353pub enum OrtLanguageProjection {
354	ORT_PROJECTION_C = 0,
355	ORT_PROJECTION_CPLUSPLUS = 1,
356	ORT_PROJECTION_CSHARP = 2,
357	ORT_PROJECTION_PYTHON = 3,
358	ORT_PROJECTION_JAVA = 4,
359	ORT_PROJECTION_WINML = 5,
360	ORT_PROJECTION_NODEJS = 6
361}
362#[repr(C)]
363#[derive(Debug, Copy, Clone)]
364pub struct OrtKernelInfo {
365	_unused: [u8; 0]
366}
367#[repr(C)]
368#[derive(Debug, Copy, Clone)]
369pub struct OrtKernelContext {
370	_unused: [u8; 0]
371}
372#[repr(i32)]
373#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
374pub enum OrtAllocatorType {
375	OrtInvalidAllocator = -1,
376	OrtDeviceAllocator = 0,
377	OrtArenaAllocator = 1
378}
379impl OrtMemType {
380	pub const OrtMemTypeCPU: OrtMemType = OrtMemType::OrtMemTypeCPUOutput;
381}
382#[repr(i32)]
383#[doc = " \\brief Memory types for allocated memory, execution provider specific types should be extended in each provider."]
384#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
385pub enum OrtMemType {
386	#[doc = "< Any CPU memory used by non-CPU execution provider"]
387	OrtMemTypeCPUInput = -2,
388	#[doc = "< CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED"]
389	OrtMemTypeCPUOutput = -1,
390	#[doc = "< The default allocator for execution provider"]
391	OrtMemTypeDefault = 0
392}
393#[repr(i32)]
394#[doc = " \\brief This mimics OrtDevice type constants so they can be returned in the API"]
395#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
396pub enum OrtMemoryInfoDeviceType {
397	OrtMemoryInfoDeviceType_CPU = 0,
398	OrtMemoryInfoDeviceType_GPU = 1,
399	OrtMemoryInfoDeviceType_FPGA = 2
400}
401#[repr(i32)]
402#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
403pub enum OrtHardwareDeviceType {
404	OrtHardwareDeviceType_CPU = 0,
405	OrtHardwareDeviceType_GPU = 1,
406	OrtHardwareDeviceType_NPU = 2
407}
408#[repr(i32)]
409#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
410pub enum OrtExecutionProviderDevicePolicy {
411	OrtExecutionProviderDevicePolicy_DEFAULT = 0,
412	OrtExecutionProviderDevicePolicy_PREFER_CPU = 1,
413	OrtExecutionProviderDevicePolicy_PREFER_NPU = 2,
414	OrtExecutionProviderDevicePolicy_PREFER_GPU = 3,
415	OrtExecutionProviderDevicePolicy_MAX_PERFORMANCE = 4,
416	OrtExecutionProviderDevicePolicy_MAX_EFFICIENCY = 5,
417	OrtExecutionProviderDevicePolicy_MIN_OVERALL_POWER = 6
418}
419pub type EpSelectionDelegate = Option<
420	unsafe extern "system" fn(
421		ep_devices: *const *const OrtEpDevice,
422		num_devices: usize,
423		model_metadata: *const OrtKeyValuePairs,
424		runtime_metadata: *const OrtKeyValuePairs,
425		selected: *mut *const OrtEpDevice,
426		max_selected: usize,
427		num_selected: *mut usize,
428		state: *mut c_void
429	) -> OrtStatusPtr
430>;
431#[repr(i32)]
432#[doc = " \\brief Algorithm to use for cuDNN Convolution Op"]
433#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
434pub enum OrtCudnnConvAlgoSearch {
435	OrtCudnnConvAlgoSearchExhaustive = 0,
436	OrtCudnnConvAlgoSearchHeuristic = 1,
437	OrtCudnnConvAlgoSearchDefault = 2
438}
439#[doc = " \\brief CUDA Provider Options\n\n \\see OrtApi::SessionOptionsAppendExecutionProvider_CUDA"]
440#[repr(C)]
441#[derive(Debug, Copy, Clone)]
442pub struct OrtCUDAProviderOptions {
443	#[doc = " \\brief CUDA device Id\n   Defaults to 0."]
444	pub device_id: core::ffi::c_int,
445	#[doc = " \\brief CUDA Convolution algorithm search configuration.\n   See enum OrtCudnnConvAlgoSearch for more details.\n   Defaults to OrtCudnnConvAlgoSearchExhaustive."]
446	pub cudnn_conv_algo_search: OrtCudnnConvAlgoSearch,
447	#[doc = " \\brief CUDA memory limit (To use all possible memory pass in maximum usize)\n   Defaults to SIZE_MAX.\n   \\note If a ::OrtArenaCfg has been applied, it will override this field"]
448	pub gpu_mem_limit: usize,
449	#[doc = " \\brief Strategy used to grow the memory arena\n   0 = kNextPowerOfTwo<br>\n   1 = kSameAsRequested<br>\n   Defaults to 0.\n   \\note If a ::OrtArenaCfg has been applied, it will override this field"]
450	pub arena_extend_strategy: core::ffi::c_int,
451	#[doc = " \\brief Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA EP\n   0 = Use separate streams for copying and compute.\n   1 = Use the same stream for copying and compute.\n   Defaults to 1.\n   WARNING: Setting this to 0 may result in data races for some models.\n   Please see issue #4829 for more details."]
452	pub do_copy_in_default_stream: core::ffi::c_int,
453	#[doc = " \\brief Flag indicating if there is a user provided compute stream\n   Defaults to 0."]
454	pub has_user_compute_stream: core::ffi::c_int,
455	#[doc = " \\brief User provided compute stream.\n   If provided, please set `has_user_compute_stream` to 1."]
456	pub user_compute_stream: *mut core::ffi::c_void,
457	#[doc = " \\brief CUDA memory arena configuration parameters"]
458	pub default_memory_arena_cfg: *mut OrtArenaCfg,
459	#[doc = " \\brief Enable TunableOp for using.\n   Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default.\n   This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
460	pub tunable_op_enable: core::ffi::c_int,
461	#[doc = " \\brief Enable TunableOp for tuning.\n   Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default.\n   This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
462	pub tunable_op_tuning_enable: core::ffi::c_int,
463	#[doc = " \\brief Max tuning duration time limit for each instance of TunableOp.\n   Defaults to 0 to disable the limit."]
464	pub tunable_op_max_tuning_duration_ms: core::ffi::c_int
465}
466#[doc = " \\brief ROCM Provider Options\n\n \\see OrtApi::SessionOptionsAppendExecutionProvider_ROCM"]
467#[repr(C)]
468#[derive(Debug, Copy, Clone)]
469pub struct OrtROCMProviderOptions {
470	#[doc = " \\brief ROCM device Id\n   Defaults to 0."]
471	pub device_id: core::ffi::c_int,
472	#[doc = " \\brief ROCM MIOpen Convolution algorithm exaustive search option.\n   Defaults to 0 (false)."]
473	pub miopen_conv_exhaustive_search: core::ffi::c_int,
474	#[doc = " \\brief ROCM memory limit (To use all possible memory pass in maximum usize)\n   Defaults to SIZE_MAX.\n   \\note If a ::OrtArenaCfg has been applied, it will override this field"]
475	pub gpu_mem_limit: usize,
476	#[doc = " \\brief Strategy used to grow the memory arena\n   0 = kNextPowerOfTwo<br>\n   1 = kSameAsRequested<br>\n   Defaults to 0.\n   \\note If a ::OrtArenaCfg has been applied, it will override this field"]
477	pub arena_extend_strategy: core::ffi::c_int,
478	#[doc = " \\brief Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM EP\n   0 = Use separate streams for copying and compute.\n   1 = Use the same stream for copying and compute.\n   Defaults to 1.\n   WARNING: Setting this to 0 may result in data races for some models.\n   Please see issue #4829 for more details."]
479	pub do_copy_in_default_stream: core::ffi::c_int,
480	#[doc = " \\brief Flag indicating if there is a user provided compute stream\n   Defaults to 0."]
481	pub has_user_compute_stream: core::ffi::c_int,
482	#[doc = " \\brief User provided compute stream.\n   If provided, please set `has_user_compute_stream` to 1."]
483	pub user_compute_stream: *mut core::ffi::c_void,
484	#[doc = " \\brief ROCM memory arena configuration parameters"]
485	pub default_memory_arena_cfg: *mut OrtArenaCfg,
486	pub enable_hip_graph: core::ffi::c_int,
487	#[doc = " \\brief Enable TunableOp for using.\n   Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default.\n   This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
488	pub tunable_op_enable: core::ffi::c_int,
489	#[doc = " \\brief Enable TunableOp for tuning.\n   Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default.\n   This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
490	pub tunable_op_tuning_enable: core::ffi::c_int,
491	#[doc = " \\brief Max tuning duration time limit for each instance of TunableOp.\n   Defaults to 0 to disable the limit."]
492	pub tunable_op_max_tuning_duration_ms: core::ffi::c_int
493}
494#[doc = " \\brief TensorRT Provider Options\n\n \\see OrtApi::SessionOptionsAppendExecutionProvider_TensorRT"]
495#[repr(C)]
496#[derive(Debug, Copy, Clone)]
497pub struct OrtTensorRTProviderOptions {
498	#[doc = "< CUDA device id (0 = default device)"]
499	pub device_id: core::ffi::c_int,
500	pub has_user_compute_stream: core::ffi::c_int,
501	pub user_compute_stream: *mut core::ffi::c_void,
502	pub trt_max_partition_iterations: core::ffi::c_int,
503	pub trt_min_subgraph_size: core::ffi::c_int,
504	pub trt_max_workspace_size: usize,
505	pub trt_fp16_enable: core::ffi::c_int,
506	pub trt_int8_enable: core::ffi::c_int,
507	pub trt_int8_calibration_table_name: *const core::ffi::c_char,
508	pub trt_int8_use_native_calibration_table: core::ffi::c_int,
509	pub trt_dla_enable: core::ffi::c_int,
510	pub trt_dla_core: core::ffi::c_int,
511	pub trt_dump_subgraphs: core::ffi::c_int,
512	pub trt_engine_cache_enable: core::ffi::c_int,
513	pub trt_engine_cache_path: *const core::ffi::c_char,
514	pub trt_engine_decryption_enable: core::ffi::c_int,
515	pub trt_engine_decryption_lib_path: *const core::ffi::c_char,
516	pub trt_force_sequential_engine_build: core::ffi::c_int
517}
518#[doc = " \\brief MIGraphX Provider Options\n\n \\see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX"]
519#[repr(C)]
520#[derive(Debug, Copy, Clone)]
521pub struct OrtMIGraphXProviderOptions {
522	pub device_id: core::ffi::c_int,
523	pub migraphx_fp16_enable: core::ffi::c_int,
524	pub migraphx_int8_enable: core::ffi::c_int,
525	pub migraphx_use_native_calibration_table: core::ffi::c_int,
526	pub migraphx_int8_calibration_table_name: *const core::ffi::c_char,
527	pub migraphx_save_compiled_model: core::ffi::c_int,
528	pub migraphx_save_model_path: *const core::ffi::c_char,
529	pub migraphx_load_compiled_model: core::ffi::c_int,
530	pub migraphx_load_model_path: *const core::ffi::c_char,
531	pub migraphx_exhaustive_tune: bool
532}
533#[doc = " \\brief OpenVINO Provider Options\n\n \\see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO"]
534#[repr(C)]
535#[derive(Debug, Copy, Clone)]
536pub struct OrtOpenVINOProviderOptions {
537	#[doc = " \\brief Device type string\n\n Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
538	pub device_type: *const core::ffi::c_char,
539	#[doc = "< 0 = disabled, nonzero = enabled"]
540	pub enable_npu_fast_compile: core::ffi::c_uchar,
541	pub device_id: *const core::ffi::c_char,
542	#[doc = "< 0 = Use default number of threads"]
543	pub num_of_threads: usize,
544	pub cache_dir: *const core::ffi::c_char,
545	pub context: *mut core::ffi::c_void,
546	#[doc = "< 0 = disabled, nonzero = enabled"]
547	pub enable_opencl_throttling: core::ffi::c_uchar,
548	#[doc = "< 0 = disabled, nonzero = enabled"]
549	pub enable_dynamic_shapes: core::ffi::c_uchar
550}
551#[repr(C)]
552#[derive(Debug, Copy, Clone)]
553pub struct OrtTrainingSession {
554	_unused: [u8; 0]
555}
556#[repr(C)]
557#[derive(Debug, Copy, Clone)]
558pub struct OrtCheckpointState {
559	_unused: [u8; 0]
560}
561#[repr(i32)]
562#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
563pub enum OrtPropertyType {
564	OrtIntProperty = 0,
565	OrtFloatProperty = 1,
566	OrtStringProperty = 2
567}
568#[repr(C)]
569#[derive(Debug, Copy, Clone)]
570pub struct OrtTrainingApi {
571	pub LoadCheckpoint: unsafe extern "system" fn(checkpoint_path: *const ortchar, checkpoint_state: *mut *mut OrtCheckpointState) -> OrtStatusPtr,
572	pub SaveCheckpoint:
573		unsafe extern "system" fn(checkpoint_state: *mut OrtCheckpointState, checkpoint_path: *const ortchar, include_optimizer_state: bool) -> OrtStatusPtr,
574	pub CreateTrainingSession: unsafe extern "system" fn(
575		env: *const OrtEnv,
576		options: *const OrtSessionOptions,
577		checkpoint_state: *mut OrtCheckpointState,
578		train_model_path: *const ortchar,
579		eval_model_path: *const ortchar,
580		optimizer_model_path: *const ortchar,
581		out: *mut *mut OrtTrainingSession
582	) -> OrtStatusPtr,
583	pub CreateTrainingSessionFromBuffer: unsafe extern "system" fn(
584		env: *const OrtEnv,
585		options: *const OrtSessionOptions,
586		checkpoint_state: *mut OrtCheckpointState,
587		train_model_data: *const (),
588		train_data_length: usize,
589		eval_model_data: *const (),
590		eval_data_length: usize,
591		optimizer_model_data: *const (),
592		optimizer_data_length: usize,
593		out: *mut *mut OrtTrainingSession
594	) -> OrtStatusPtr,
595	pub TrainingSessionGetTrainingModelOutputCount: unsafe extern "system" fn(sess: *const OrtTrainingSession, out: *mut usize) -> OrtStatusPtr,
596	pub TrainingSessionGetEvalModelOutputCount: unsafe extern "system" fn(sess: *const OrtTrainingSession, out: *mut usize) -> OrtStatusPtr,
597	pub TrainingSessionGetTrainingModelOutputName:
598		unsafe extern "system" fn(sess: *const OrtTrainingSession, index: usize, allocator: *mut OrtAllocator, output: *mut *const c_char) -> OrtStatusPtr,
599	pub TrainingSessionGetEvalModelOutputName:
600		unsafe extern "system" fn(sess: *const OrtTrainingSession, index: usize, allocator: *mut OrtAllocator, output: *mut *const c_char) -> OrtStatusPtr,
601	pub LazyResetGrad: unsafe extern "system" fn(session: *mut OrtTrainingSession) -> OrtStatusPtr,
602	pub TrainStep: unsafe extern "system" fn(
603		session: *mut OrtTrainingSession,
604		run_options: *const OrtRunOptions,
605		inputs_len: usize,
606		inputs: *const *const OrtValue,
607		outputs_len: usize,
608		outputs: *mut *mut OrtValue
609	) -> OrtStatusPtr,
610	pub EvalStep: unsafe extern "system" fn(
611		session: *mut OrtTrainingSession,
612		run_options: *const OrtRunOptions,
613		inputs_len: usize,
614		inputs: *const *const OrtValue,
615		outputs_len: usize,
616		outputs: *mut *mut OrtValue
617	) -> OrtStatusPtr,
618	pub SetLearningRate: unsafe extern "system" fn(session: *mut OrtTrainingSession, learning_rate: f32) -> OrtStatusPtr,
619	pub GetLearningRate: unsafe extern "system" fn(session: *mut OrtTrainingSession, learning_rate: *mut f32) -> OrtStatusPtr,
620	pub OptimizerStep: unsafe extern "system" fn(session: *mut OrtTrainingSession, run_options: *const OrtRunOptions) -> OrtStatusPtr,
621	pub RegisterLinearLRScheduler:
622		unsafe extern "system" fn(session: *mut OrtTrainingSession, warmup_step_count: i64, total_step_count: i64, initial_lr: f32) -> OrtStatusPtr,
623	pub SchedulerStep: unsafe extern "system" fn(session: *mut OrtTrainingSession) -> OrtStatusPtr,
624	pub GetParametersSize: unsafe extern "system" fn(session: *mut OrtTrainingSession, out: *mut usize, trainable_only: bool) -> OrtStatusPtr,
625	pub CopyParametersToBuffer:
626		unsafe extern "system" fn(session: *mut OrtTrainingSession, parameters_buffer: *mut OrtValue, trainable_only: bool) -> OrtStatusPtr,
627	pub CopyBufferToParameters:
628		unsafe extern "system" fn(session: *mut OrtTrainingSession, parameters_buffer: *mut OrtValue, trainable_only: bool) -> OrtStatusPtr,
629	pub ReleaseTrainingSession: unsafe extern "system" fn(input: *mut OrtTrainingSession),
630	pub ReleaseCheckpointState: unsafe extern "system" fn(input: *mut OrtCheckpointState),
631	pub ExportModelForInferencing: unsafe extern "system" fn(
632		session: *mut OrtTrainingSession,
633		inference_model_path: *const ortchar,
634		graph_outputs_len: usize,
635		graph_output_names: *const *const c_char
636	) -> OrtStatusPtr,
637	pub SetSeed: unsafe extern "system" fn(seed: i64) -> OrtStatusPtr,
638	pub TrainingSessionGetTrainingModelInputCount: unsafe extern "system" fn(session: *const OrtTrainingSession, out: *mut usize) -> OrtStatusPtr,
639	pub TrainingSessionGetEvalModelInputCount: unsafe extern "system" fn(session: *const OrtTrainingSession, out: *mut usize) -> OrtStatusPtr,
640	pub TrainingSessionGetTrainingModelInputName:
641		unsafe extern "system" fn(session: *const OrtTrainingSession, index: usize, allocator: *mut OrtAllocator, output: *mut *const c_char) -> OrtStatusPtr,
642	pub TrainingSessionGetEvalModelInputName:
643		unsafe extern "system" fn(session: *const OrtTrainingSession, index: usize, allocator: *mut OrtAllocator, output: *mut *const c_char) -> OrtStatusPtr,
644	pub AddProperty: unsafe extern "system" fn(
645		checkpoint_state: *mut OrtCheckpointState,
646		property_name: *const c_char,
647		property_type: OrtPropertyType,
648		property_value: *const ()
649	) -> OrtStatusPtr,
650	pub GetProperty: unsafe extern "system" fn(
651		checkpoint_state: *mut OrtCheckpointState,
652		property_name: *const c_char,
653		allocator: *mut OrtAllocator,
654		property_type: *mut OrtPropertyType,
655		property_value: *mut *const ()
656	) -> OrtStatusPtr,
657	pub LoadCheckpointFromBuffer:
658		unsafe extern "system" fn(checkpoint_buffer: *const (), num_bytes: usize, checkpoint_state: *mut *mut OrtCheckpointState) -> OrtStatusPtr,
659	pub GetParameterTypeAndShape: unsafe extern "system" fn(
660		checkpoint_state: *const OrtCheckpointState,
661		parameter_name: *const c_char,
662		parameter_type_and_shape: *mut *mut OrtTensorTypeAndShapeInfo
663	) -> OrtStatusPtr,
664	pub UpdateParameter:
665		unsafe extern "system" fn(checkpoint_state: *mut OrtCheckpointState, parameter_name: *const c_char, parameter: *mut OrtValue) -> OrtStatusPtr,
666	pub GetParameter: unsafe extern "system" fn(
667		checkpoint_state: *const OrtCheckpointState,
668		parameter_name: *const c_char,
669		allocator: *mut OrtAllocator,
670		parameter: *mut *mut OrtValue
671	) -> OrtStatusPtr
672}
673#[repr(C)]
674#[derive(Debug, Copy, Clone)]
675pub struct OrtModelEditorApi {
676	pub CreateTensorTypeInfo: unsafe extern "system" fn(tensor_info: *const OrtTensorTypeAndShapeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
677	pub CreateSparseTensorTypeInfo: unsafe extern "system" fn(tensor_info: *const OrtTensorTypeAndShapeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
678	pub CreateMapTypeInfo: unsafe extern "system" fn(
679		map_key_type: ONNXTensorElementDataType,
680		map_value_type: *const OrtTypeInfo,
681		type_info: *mut *mut OrtTypeInfo
682	) -> OrtStatusPtr,
683	pub CreateSequenceTypeInfo: unsafe extern "system" fn(sequence_type: *const OrtTypeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
684	pub CreateOptionalTypeInfo: unsafe extern "system" fn(contained_type: *const OrtTypeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
685	pub CreateValueInfo: unsafe extern "system" fn(name: *const c_char, type_info: *const OrtTypeInfo, value_info: *mut *mut OrtValueInfo) -> OrtStatusPtr,
686	pub CreateNode: unsafe extern "system" fn(
687		operator_name: *const c_char,
688		domain_name: *const c_char,
689		node_name: *const c_char,
690		input_names: *const *const c_char,
691		input_names_len: usize,
692		output_names: *const *const c_char,
693		output_names_len: usize,
694		attributes: *mut *mut OrtOpAttr,
695		attribs_len: usize,
696		node: *mut *mut OrtNode
697	) -> OrtStatusPtr,
698	pub CreateGraph: unsafe extern "system" fn(graph: *mut *mut OrtGraph) -> OrtStatusPtr,
699	pub SetGraphInputs: unsafe extern "system" fn(graph: *mut OrtGraph, inputs: *mut *mut OrtValueInfo, inputs_len: usize) -> OrtStatusPtr,
700	pub SetGraphOutputs: unsafe extern "system" fn(graph: *mut OrtGraph, outputs: *mut *mut OrtValueInfo, outputs_len: usize) -> OrtStatusPtr,
701	pub AddInitializerToGraph:
702		unsafe extern "system" fn(graph: *mut OrtGraph, name: *const c_char, tensor: *mut OrtValue, data_is_external: bool) -> OrtStatusPtr,
703	pub AddNodeToGraph: unsafe extern "system" fn(graph: *mut OrtGraph, node: *mut OrtNode) -> OrtStatusPtr,
704	pub CreateModel: unsafe extern "system" fn(
705		domain_names: *const *const c_char,
706		opset_versions: *const i32,
707		opset_entries_len: usize,
708		model: *mut *mut OrtModel
709	) -> OrtStatusPtr,
710	pub AddGraphToModel: unsafe extern "system" fn(model: *mut OrtModel, graph: *mut OrtGraph) -> OrtStatusPtr,
711	pub CreateSessionFromModel:
712		unsafe extern "system" fn(env: *const OrtEnv, model: *const OrtModel, options: *const OrtSessionOptions, out: *mut *mut OrtSession) -> OrtStatusPtr,
713	pub CreateModelEditorSession:
714		unsafe extern "system" fn(env: *const OrtEnv, model_path: *const ortchar, options: *const OrtSessionOptions, out: *mut *mut OrtSession) -> OrtStatusPtr,
715	pub CreateModelEditorSessionFromArray: unsafe extern "system" fn(
716		env: *const OrtEnv,
717		model_data: *const c_void,
718		model_data_length: usize,
719		options: *const OrtSessionOptions,
720		out: *mut *mut OrtSession
721	) -> OrtStatusPtr,
722	pub SessionGetOpsetForDomain: unsafe extern "system" fn(session: *const OrtSession, domain: *const c_char, opset: *mut i32) -> OrtStatusPtr,
723	pub ApplyModelToModelEditorSession: unsafe extern "system" fn(session: *mut OrtSession, model: *mut OrtModel) -> OrtStatusPtr,
724	pub FinalizeModelEditorSession: unsafe extern "system" fn(
725		session: *mut OrtSession,
726		options: *const OrtSessionOptions,
727		prepacked_weights_container: *const OrtPrepackedWeightsContainer
728	) -> OrtStatusPtr
729}
730#[repr(C)]
731#[derive(Debug, Copy, Clone)]
732pub struct OrtCompileApi {
733	pub ReleaseModelCompilationOptions: unsafe extern "system" fn(input: *mut OrtModelCompilationOptions),
734	pub CreateModelCompilationOptionsFromSessionOptions:
735		unsafe extern "system" fn(env: *const OrtEnv, session_options: *const OrtSessionOptions, out: *mut *mut OrtModelCompilationOptions) -> OrtStatusPtr,
736	pub ModelCompilationOptions_SetInputModelPath:
737		unsafe extern "system" fn(model_compile_options: *mut OrtModelCompilationOptions, input_model_path: *const ortchar) -> OrtStatusPtr,
738	pub ModelCompilationOptions_SetInputModelFromBuffer: unsafe extern "system" fn(
739		model_compile_options: *mut OrtModelCompilationOptions,
740		input_model_data: *const c_void,
741		input_model_data_size: usize
742	) -> OrtStatusPtr,
743	pub ModelCompilationOptions_SetOutputModelPath:
744		unsafe extern "system" fn(model_compile_options: *mut OrtModelCompilationOptions, output_model_path: *const ortchar) -> OrtStatusPtr,
745	pub ModelCompilationOptions_SetOutputModelExternalInitializersFile: unsafe extern "system" fn(
746		model_compile_options: *mut OrtModelCompilationOptions,
747		external_initializers_file_path: *const ortchar,
748		external_initializers_size_threshold: usize
749	) -> OrtStatusPtr,
750	pub ModelCompilationOptions_SetOutputModelBuffer: unsafe extern "system" fn(
751		model_compile_options: *mut OrtModelCompilationOptions,
752		allocator: *mut OrtAllocator,
753		output_model_buffer_ptr: *mut *mut c_void,
754		output_model_buffer_size_ptr: *mut usize
755	) -> OrtStatusPtr,
756	pub ModelCompilationOptions_SetEpContextEmbedMode:
757		unsafe extern "system" fn(model_compile_options: *mut OrtModelCompilationOptions, embed_ep_context_in_model: bool) -> OrtStatusPtr,
758	pub CompileModel: unsafe extern "system" fn(env: *const OrtEnv, model_options: *const OrtModelCompilationOptions) -> OrtStatusPtr
759}
760#[repr(C)]
761#[derive(Debug, Copy, Clone)]
762pub struct OrtEpApi {
763	_unused: [u8; 0]
764}
765#[doc = " \\brief The helper interface to get the right version of OrtApi\n\n Get a pointer to this structure through ::OrtGetApiBase"]
766#[repr(C)]
767#[derive(Debug, Copy, Clone)]
768pub struct OrtApiBase {
769	#[doc = " \\brief Get a pointer to the requested version of the ::OrtApi\n\n \\param[in] version Must be ::ORT_API_VERSION\n \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime\n   older than the version created with this header file.\n\n One can call GetVersionString() to get the version of the Onnxruntime library for logging\n and error reporting purposes."]
770	pub GetApi: unsafe extern "system" fn(version: u32) -> *const OrtApi,
771	#[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")\n\n  \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
772	pub GetVersionString: unsafe extern "system" fn() -> *const core::ffi::c_char
773}
774extern "system" {
775	#[doc = " \\brief The Onnxruntime library's entry point to access the C API\n\n Call this to get the a pointer to an ::OrtApiBase"]
776	pub fn OrtGetApiBase() -> *const OrtApiBase;
777}
778#[doc = " \\brief Thread work loop function\n\n Onnxruntime will provide the working loop on custom thread creation\n Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn"]
779pub type OrtThreadWorkerFn = unsafe extern "system" fn(ort_worker_fn_param: *mut core::ffi::c_void);
780#[repr(C)]
781#[derive(Debug, Copy, Clone)]
782pub struct OrtCustomHandleType {
783	pub __place_holder: core::ffi::c_char
784}
785pub type OrtCustomThreadHandle = *const OrtCustomHandleType;
786#[doc = " \\brief Ort custom thread creation function\n\n The function should return a thread handle to be used in onnxruntime thread pools\n Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread"]
787pub type OrtCustomCreateThreadFn = Option<
788	unsafe extern "system" fn(
789		ort_custom_thread_creation_options: *mut core::ffi::c_void,
790		ort_thread_worker_fn: OrtThreadWorkerFn,
791		ort_worker_fn_param: *mut core::ffi::c_void
792	) -> OrtCustomThreadHandle
793>;
794#[doc = " \\brief Custom thread join function\n\n Onnxruntime thread pool destructor will call the function to join a custom thread.\n Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn"]
795pub type OrtCustomJoinThreadFn = Option<unsafe extern "system" fn(ort_custom_thread_handle: OrtCustomThreadHandle)>;
796#[doc = " \\brief Callback function for RunAsync\n\n \\param[in] user_data User specific data that passed back to the callback\n \\param[out] outputs On succeed, outputs host inference results, on error, the value will be nullptr\n \\param[out] num_outputs Number of outputs, on error, the value will be zero\n \\param[out] status On error, status will provide details"]
797pub type RunAsyncCallbackFn =
798	Option<unsafe extern "system" fn(user_data: *mut core::ffi::c_void, outputs: *mut *mut OrtValue, num_outputs: usize, status: OrtStatusPtr)>;
799#[doc = " \\brief The C API\n\n All C API functions are defined inside this structure as pointers to functions.\n Call OrtApiBase::GetApi to get a pointer to it\n\n \\nosubgrouping"]
800#[repr(C)]
801#[derive(Debug, Copy, Clone)]
802pub struct OrtApi {
803	#[doc = " \\brief Create an OrtStatus from a null terminated string\n\n \\param[in] code\n \\param[in] msg A null-terminated string. Its contents will be copied.\n \\return A new OrtStatus object, must be destroyed with OrtApi::ReleaseStatus"]
804	pub CreateStatus: unsafe extern "system" fn(code: OrtErrorCode, msg: *const core::ffi::c_char) -> OrtStatusPtr,
805	#[doc = " \\brief Get OrtErrorCode from OrtStatus\n\n \\param[in] status\n \\return OrtErrorCode that \\p status was created with"]
806	pub GetErrorCode: unsafe extern "system" fn(status: *const OrtStatus) -> OrtErrorCode,
807	#[doc = " \\brief Get error string from OrtStatus\n\n \\param[in] status\n \\return The error message inside the `status`. Do not free the returned value."]
808	pub GetErrorMessage: unsafe extern "system" fn(status: *const OrtStatus) -> *const core::ffi::c_char,
809	pub CreateEnv: unsafe extern "system" fn(log_severity_level: OrtLoggingLevel, logid: *const core::ffi::c_char, out: *mut *mut OrtEnv) -> OrtStatusPtr,
810	pub CreateEnvWithCustomLogger: unsafe extern "system" fn(
811		logging_function: OrtLoggingFunction,
812		logger_param: *mut core::ffi::c_void,
813		log_severity_level: OrtLoggingLevel,
814		logid: *const core::ffi::c_char,
815		out: *mut *mut OrtEnv
816	) -> OrtStatusPtr,
817	pub EnableTelemetryEvents: unsafe extern "system" fn(env: *const OrtEnv) -> OrtStatusPtr,
818	pub DisableTelemetryEvents: unsafe extern "system" fn(env: *const OrtEnv) -> OrtStatusPtr,
819	pub CreateSession:
820		unsafe extern "system" fn(env: *const OrtEnv, model_path: *const ortchar, options: *const OrtSessionOptions, out: *mut *mut OrtSession) -> OrtStatusPtr,
821	pub CreateSessionFromArray: unsafe extern "system" fn(
822		env: *const OrtEnv,
823		model_data: *const core::ffi::c_void,
824		model_data_length: usize,
825		options: *const OrtSessionOptions,
826		out: *mut *mut OrtSession
827	) -> OrtStatusPtr,
828	pub Run: unsafe extern "system" fn(
829		session: *mut OrtSession,
830		run_options: *const OrtRunOptions,
831		input_names: *const *const core::ffi::c_char,
832		inputs: *const *const OrtValue,
833		input_len: usize,
834		output_names: *const *const core::ffi::c_char,
835		output_names_len: usize,
836		outputs: *mut *mut OrtValue
837	) -> OrtStatusPtr,
838	pub CreateSessionOptions: unsafe extern "system" fn(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr,
839	pub SetOptimizedModelFilePath: unsafe extern "system" fn(options: *mut OrtSessionOptions, optimized_model_filepath: *const ortchar) -> OrtStatusPtr,
840	pub CloneSessionOptions: unsafe extern "system" fn(in_options: *const OrtSessionOptions, out_options: *mut *mut OrtSessionOptions) -> OrtStatusPtr,
841	pub SetSessionExecutionMode: unsafe extern "system" fn(options: *mut OrtSessionOptions, execution_mode: ExecutionMode) -> OrtStatusPtr,
842	pub EnableProfiling: unsafe extern "system" fn(options: *mut OrtSessionOptions, profile_file_prefix: *const ortchar) -> OrtStatusPtr,
843	pub DisableProfiling: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
844	pub EnableMemPattern: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
845	pub DisableMemPattern: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
846	pub EnableCpuMemArena: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
847	pub DisableCpuMemArena: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
848	pub SetSessionLogId: unsafe extern "system" fn(options: *mut OrtSessionOptions, logid: *const core::ffi::c_char) -> OrtStatusPtr,
849	pub SetSessionLogVerbosityLevel: unsafe extern "system" fn(options: *mut OrtSessionOptions, session_log_verbosity_level: core::ffi::c_int) -> OrtStatusPtr,
850	pub SetSessionLogSeverityLevel: unsafe extern "system" fn(options: *mut OrtSessionOptions, session_log_severity_level: core::ffi::c_int) -> OrtStatusPtr,
851	pub SetSessionGraphOptimizationLevel:
852		unsafe extern "system" fn(options: *mut OrtSessionOptions, graph_optimization_level: GraphOptimizationLevel) -> OrtStatusPtr,
853	pub SetIntraOpNumThreads: unsafe extern "system" fn(options: *mut OrtSessionOptions, intra_op_num_threads: core::ffi::c_int) -> OrtStatusPtr,
854	pub SetInterOpNumThreads: unsafe extern "system" fn(options: *mut OrtSessionOptions, inter_op_num_threads: core::ffi::c_int) -> OrtStatusPtr,
855	pub CreateCustomOpDomain: unsafe extern "system" fn(domain: *const core::ffi::c_char, out: *mut *mut OrtCustomOpDomain) -> OrtStatusPtr,
856	pub CustomOpDomain_Add: unsafe extern "system" fn(custom_op_domain: *mut OrtCustomOpDomain, op: *const OrtCustomOp) -> OrtStatusPtr,
857	pub AddCustomOpDomain: unsafe extern "system" fn(options: *mut OrtSessionOptions, custom_op_domain: *mut OrtCustomOpDomain) -> OrtStatusPtr,
858	pub RegisterCustomOpsLibrary: unsafe extern "system" fn(
859		options: *mut OrtSessionOptions,
860		library_path: *const core::ffi::c_char,
861		library_handle: *mut *mut core::ffi::c_void
862	) -> OrtStatusPtr,
863	pub SessionGetInputCount: unsafe extern "system" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr,
864	pub SessionGetOutputCount: unsafe extern "system" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr,
865	pub SessionGetOverridableInitializerCount: unsafe extern "system" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr,
866	pub SessionGetInputTypeInfo: unsafe extern "system" fn(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
867	pub SessionGetOutputTypeInfo: unsafe extern "system" fn(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
868	pub SessionGetOverridableInitializerTypeInfo:
869		unsafe extern "system" fn(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
870	pub SessionGetInputName:
871		unsafe extern "system" fn(session: *const OrtSession, index: usize, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
872	pub SessionGetOutputName:
873		unsafe extern "system" fn(session: *const OrtSession, index: usize, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
874	pub SessionGetOverridableInitializerName:
875		unsafe extern "system" fn(session: *const OrtSession, index: usize, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
876	pub CreateRunOptions: unsafe extern "system" fn(out: *mut *mut OrtRunOptions) -> OrtStatusPtr,
877	pub RunOptionsSetRunLogVerbosityLevel: unsafe extern "system" fn(options: *mut OrtRunOptions, log_verbosity_level: core::ffi::c_int) -> OrtStatusPtr,
878	pub RunOptionsSetRunLogSeverityLevel: unsafe extern "system" fn(options: *mut OrtRunOptions, log_severity_level: core::ffi::c_int) -> OrtStatusPtr,
879	pub RunOptionsSetRunTag: unsafe extern "system" fn(options: *mut OrtRunOptions, run_tag: *const core::ffi::c_char) -> OrtStatusPtr,
880	pub RunOptionsGetRunLogVerbosityLevel: unsafe extern "system" fn(options: *const OrtRunOptions, log_verbosity_level: *mut core::ffi::c_int) -> OrtStatusPtr,
881	pub RunOptionsGetRunLogSeverityLevel: unsafe extern "system" fn(options: *const OrtRunOptions, log_severity_level: *mut core::ffi::c_int) -> OrtStatusPtr,
882	pub RunOptionsGetRunTag: unsafe extern "system" fn(options: *const OrtRunOptions, run_tag: *mut *const core::ffi::c_char) -> OrtStatusPtr,
883	pub RunOptionsSetTerminate: unsafe extern "system" fn(options: *mut OrtRunOptions) -> OrtStatusPtr,
884	pub RunOptionsUnsetTerminate: unsafe extern "system" fn(options: *mut OrtRunOptions) -> OrtStatusPtr,
885	pub CreateTensorAsOrtValue: unsafe extern "system" fn(
886		allocator: *mut OrtAllocator,
887		shape: *const i64,
888		shape_len: usize,
889		type_: ONNXTensorElementDataType,
890		out: *mut *mut OrtValue
891	) -> OrtStatusPtr,
892	pub CreateTensorWithDataAsOrtValue: unsafe extern "system" fn(
893		info: *const OrtMemoryInfo,
894		p_data: *mut core::ffi::c_void,
895		p_data_len: usize,
896		shape: *const i64,
897		shape_len: usize,
898		type_: ONNXTensorElementDataType,
899		out: *mut *mut OrtValue
900	) -> OrtStatusPtr,
901	pub IsTensor: unsafe extern "system" fn(value: *const OrtValue, out: *mut core::ffi::c_int) -> OrtStatusPtr,
902	pub GetTensorMutableData: unsafe extern "system" fn(value: *mut OrtValue, out: *mut *mut core::ffi::c_void) -> OrtStatusPtr,
903	pub FillStringTensor: unsafe extern "system" fn(value: *mut OrtValue, s: *const *const core::ffi::c_char, s_len: usize) -> OrtStatusPtr,
904	pub GetStringTensorDataLength: unsafe extern "system" fn(value: *const OrtValue, len: *mut usize) -> OrtStatusPtr,
905	pub GetStringTensorContent:
906		unsafe extern "system" fn(value: *const OrtValue, s: *mut core::ffi::c_void, s_len: usize, offsets: *mut usize, offsets_len: usize) -> OrtStatusPtr,
907	pub CastTypeInfoToTensorInfo: unsafe extern "system" fn(type_info: *const OrtTypeInfo, out: *mut *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
908	pub GetOnnxTypeFromTypeInfo: unsafe extern "system" fn(type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr,
909	pub CreateTensorTypeAndShapeInfo: unsafe extern "system" fn(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
910	pub SetTensorElementType: unsafe extern "system" fn(info: *mut OrtTensorTypeAndShapeInfo, type_: ONNXTensorElementDataType) -> OrtStatusPtr,
911	pub SetDimensions: unsafe extern "system" fn(info: *mut OrtTensorTypeAndShapeInfo, dim_values: *const i64, dim_count: usize) -> OrtStatusPtr,
912	pub GetTensorElementType: unsafe extern "system" fn(info: *const OrtTensorTypeAndShapeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr,
913	pub GetDimensionsCount: unsafe extern "system" fn(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr,
914	pub GetDimensions: unsafe extern "system" fn(info: *const OrtTensorTypeAndShapeInfo, dim_values: *mut i64, dim_values_length: usize) -> OrtStatusPtr,
915	pub GetSymbolicDimensions:
916		unsafe extern "system" fn(info: *const OrtTensorTypeAndShapeInfo, dim_params: *mut *const core::ffi::c_char, dim_params_length: usize) -> OrtStatusPtr,
917	pub GetTensorShapeElementCount: unsafe extern "system" fn(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr,
918	pub GetTensorTypeAndShape: unsafe extern "system" fn(value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
919	pub GetTypeInfo: unsafe extern "system" fn(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
920	pub GetValueType: unsafe extern "system" fn(value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr,
921	pub CreateMemoryInfo: unsafe extern "system" fn(
922		name: *const core::ffi::c_char,
923		type_: OrtAllocatorType,
924		id: core::ffi::c_int,
925		mem_type: OrtMemType,
926		out: *mut *mut OrtMemoryInfo
927	) -> OrtStatusPtr,
928	pub CreateCpuMemoryInfo: unsafe extern "system" fn(type_: OrtAllocatorType, mem_type: OrtMemType, out: *mut *mut OrtMemoryInfo) -> OrtStatusPtr,
929	pub CompareMemoryInfo: unsafe extern "system" fn(info1: *const OrtMemoryInfo, info2: *const OrtMemoryInfo, out: *mut core::ffi::c_int) -> OrtStatusPtr,
930	pub MemoryInfoGetName: unsafe extern "system" fn(ptr: *const OrtMemoryInfo, out: *mut *const core::ffi::c_char) -> OrtStatusPtr,
931	pub MemoryInfoGetId: unsafe extern "system" fn(ptr: *const OrtMemoryInfo, out: *mut core::ffi::c_int) -> OrtStatusPtr,
932	pub MemoryInfoGetMemType: unsafe extern "system" fn(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr,
933	pub MemoryInfoGetType: unsafe extern "system" fn(ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr,
934	pub AllocatorAlloc: unsafe extern "system" fn(ort_allocator: *mut OrtAllocator, size: usize, out: *mut *mut core::ffi::c_void) -> OrtStatusPtr,
935	pub AllocatorFree: unsafe extern "system" fn(ort_allocator: *mut OrtAllocator, p: *mut core::ffi::c_void) -> OrtStatusPtr,
936	pub AllocatorGetInfo: unsafe extern "system" fn(ort_allocator: *const OrtAllocator, out: *mut *const OrtMemoryInfo) -> OrtStatusPtr,
937	pub GetAllocatorWithDefaultOptions: unsafe extern "system" fn(out: *mut *mut OrtAllocator) -> OrtStatusPtr,
938	pub AddFreeDimensionOverride:
939		unsafe extern "system" fn(options: *mut OrtSessionOptions, dim_denotation: *const core::ffi::c_char, dim_value: i64) -> OrtStatusPtr,
940	pub GetValue:
941		unsafe extern "system" fn(value: *const OrtValue, index: core::ffi::c_int, allocator: *mut OrtAllocator, out: *mut *mut OrtValue) -> OrtStatusPtr,
942	pub GetValueCount: unsafe extern "system" fn(value: *const OrtValue, out: *mut usize) -> OrtStatusPtr,
943	pub CreateValue: unsafe extern "system" fn(in_: *const *const OrtValue, num_values: usize, value_type: ONNXType, out: *mut *mut OrtValue) -> OrtStatusPtr,
944	pub CreateOpaqueValue: unsafe extern "system" fn(
945		domain_name: *const core::ffi::c_char,
946		type_name: *const core::ffi::c_char,
947		data_container: *const core::ffi::c_void,
948		data_container_size: usize,
949		out: *mut *mut OrtValue
950	) -> OrtStatusPtr,
951	pub GetOpaqueValue: unsafe extern "system" fn(
952		domain_name: *const core::ffi::c_char,
953		type_name: *const core::ffi::c_char,
954		in_: *const OrtValue,
955		data_container: *mut core::ffi::c_void,
956		data_container_size: usize
957	) -> OrtStatusPtr,
958	pub KernelInfoGetAttribute_float: unsafe extern "system" fn(info: *const OrtKernelInfo, name: *const core::ffi::c_char, out: *mut f32) -> OrtStatusPtr,
959	pub KernelInfoGetAttribute_int64: unsafe extern "system" fn(info: *const OrtKernelInfo, name: *const core::ffi::c_char, out: *mut i64) -> OrtStatusPtr,
960	pub KernelInfoGetAttribute_string:
961		unsafe extern "system" fn(info: *const OrtKernelInfo, name: *const core::ffi::c_char, out: *mut core::ffi::c_char, size: *mut usize) -> OrtStatusPtr,
962	pub KernelContext_GetInputCount: unsafe extern "system" fn(context: *const OrtKernelContext, out: *mut usize) -> OrtStatusPtr,
963	pub KernelContext_GetOutputCount: unsafe extern "system" fn(context: *const OrtKernelContext, out: *mut usize) -> OrtStatusPtr,
964	pub KernelContext_GetInput: unsafe extern "system" fn(context: *const OrtKernelContext, index: usize, out: *mut *const OrtValue) -> OrtStatusPtr,
965	pub KernelContext_GetOutput: unsafe extern "system" fn(
966		context: *mut OrtKernelContext,
967		index: usize,
968		dim_values: *const i64,
969		dim_count: usize,
970		out: *mut *mut OrtValue
971	) -> OrtStatusPtr,
972	pub ReleaseEnv: unsafe extern "system" fn(input: *mut OrtEnv),
973	pub ReleaseStatus: unsafe extern "system" fn(input: *mut OrtStatus),
974	pub ReleaseMemoryInfo: unsafe extern "system" fn(input: *mut OrtMemoryInfo),
975	pub ReleaseSession: unsafe extern "system" fn(input: *mut OrtSession),
976	pub ReleaseValue: unsafe extern "system" fn(input: *mut OrtValue),
977	pub ReleaseRunOptions: unsafe extern "system" fn(input: *mut OrtRunOptions),
978	pub ReleaseTypeInfo: unsafe extern "system" fn(input: *mut OrtTypeInfo),
979	pub ReleaseTensorTypeAndShapeInfo: unsafe extern "system" fn(input: *mut OrtTensorTypeAndShapeInfo),
980	pub ReleaseSessionOptions: unsafe extern "system" fn(input: *mut OrtSessionOptions),
981	pub ReleaseCustomOpDomain: unsafe extern "system" fn(input: *mut OrtCustomOpDomain),
982	pub GetDenotationFromTypeInfo:
983		unsafe extern "system" fn(type_info: *const OrtTypeInfo, denotation: *mut *const core::ffi::c_char, len: *mut usize) -> OrtStatusPtr,
984	pub CastTypeInfoToMapTypeInfo: unsafe extern "system" fn(type_info: *const OrtTypeInfo, out: *mut *const OrtMapTypeInfo) -> OrtStatusPtr,
985	pub CastTypeInfoToSequenceTypeInfo: unsafe extern "system" fn(type_info: *const OrtTypeInfo, out: *mut *const OrtSequenceTypeInfo) -> OrtStatusPtr,
986	pub GetMapKeyType: unsafe extern "system" fn(map_type_info: *const OrtMapTypeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr,
987	pub GetMapValueType: unsafe extern "system" fn(map_type_info: *const OrtMapTypeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
988	pub GetSequenceElementType: unsafe extern "system" fn(sequence_type_info: *const OrtSequenceTypeInfo, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
989	pub ReleaseMapTypeInfo: unsafe extern "system" fn(input: *mut OrtMapTypeInfo),
990	pub ReleaseSequenceTypeInfo: unsafe extern "system" fn(input: *mut OrtSequenceTypeInfo),
991	pub SessionEndProfiling:
992		unsafe extern "system" fn(session: *mut OrtSession, allocator: *mut OrtAllocator, out: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
993	pub SessionGetModelMetadata: unsafe extern "system" fn(session: *const OrtSession, out: *mut *mut OrtModelMetadata) -> OrtStatusPtr,
994	pub ModelMetadataGetProducerName:
995		unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
996	pub ModelMetadataGetGraphName:
997		unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
998	pub ModelMetadataGetDomain:
999		unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1000	pub ModelMetadataGetDescription:
1001		unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1002	pub ModelMetadataLookupCustomMetadataMap: unsafe extern "system" fn(
1003		model_metadata: *const OrtModelMetadata,
1004		allocator: *mut OrtAllocator,
1005		key: *const core::ffi::c_char,
1006		value: *mut *mut core::ffi::c_char
1007	) -> OrtStatusPtr,
1008	pub ModelMetadataGetVersion: unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, value: *mut i64) -> OrtStatusPtr,
1009	pub ReleaseModelMetadata: unsafe extern "system" fn(input: *mut OrtModelMetadata),
1010	pub CreateEnvWithGlobalThreadPools: unsafe extern "system" fn(
1011		log_severity_level: OrtLoggingLevel,
1012		logid: *const core::ffi::c_char,
1013		tp_options: *const OrtThreadingOptions,
1014		out: *mut *mut OrtEnv
1015	) -> OrtStatusPtr,
1016	pub DisablePerSessionThreads: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
1017	pub CreateThreadingOptions: unsafe extern "system" fn(out: *mut *mut OrtThreadingOptions) -> OrtStatusPtr,
1018	pub ReleaseThreadingOptions: unsafe extern "system" fn(input: *mut OrtThreadingOptions),
1019	pub ModelMetadataGetCustomMetadataMapKeys: unsafe extern "system" fn(
1020		model_metadata: *const OrtModelMetadata,
1021		allocator: *mut OrtAllocator,
1022		keys: *mut *mut *mut core::ffi::c_char,
1023		num_keys: *mut i64
1024	) -> OrtStatusPtr,
1025	pub AddFreeDimensionOverrideByName:
1026		unsafe extern "system" fn(options: *mut OrtSessionOptions, dim_name: *const core::ffi::c_char, dim_value: i64) -> OrtStatusPtr,
1027	pub GetAvailableProviders: unsafe extern "system" fn(out_ptr: *mut *mut *mut core::ffi::c_char, provider_length: *mut core::ffi::c_int) -> OrtStatusPtr,
1028	pub ReleaseAvailableProviders: unsafe extern "system" fn(ptr: *mut *mut core::ffi::c_char, providers_length: core::ffi::c_int) -> OrtStatusPtr,
1029	pub GetStringTensorElementLength: unsafe extern "system" fn(value: *const OrtValue, index: usize, out: *mut usize) -> OrtStatusPtr,
1030	pub GetStringTensorElement: unsafe extern "system" fn(value: *const OrtValue, s_len: usize, index: usize, s: *mut core::ffi::c_void) -> OrtStatusPtr,
1031	pub FillStringTensorElement: unsafe extern "system" fn(value: *mut OrtValue, s: *const core::ffi::c_char, index: usize) -> OrtStatusPtr,
1032	pub AddSessionConfigEntry: unsafe extern "system" fn(
1033		options: *mut OrtSessionOptions,
1034		config_key: *const core::ffi::c_char,
1035		config_value: *const core::ffi::c_char
1036	) -> OrtStatusPtr,
1037	pub CreateAllocator: unsafe extern "system" fn(session: *const OrtSession, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr,
1038	pub ReleaseAllocator: unsafe extern "system" fn(input: *mut OrtAllocator),
1039	pub RunWithBinding:
1040		unsafe extern "system" fn(session: *mut OrtSession, run_options: *const OrtRunOptions, binding_ptr: *const OrtIoBinding) -> OrtStatusPtr,
1041	pub CreateIoBinding: unsafe extern "system" fn(session: *mut OrtSession, out: *mut *mut OrtIoBinding) -> OrtStatusPtr,
1042	pub ReleaseIoBinding: unsafe extern "system" fn(input: *mut OrtIoBinding),
1043	pub BindInput: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding, name: *const core::ffi::c_char, val_ptr: *const OrtValue) -> OrtStatusPtr,
1044	pub BindOutput: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding, name: *const core::ffi::c_char, val_ptr: *const OrtValue) -> OrtStatusPtr,
1045	pub BindOutputToDevice:
1046		unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding, name: *const core::ffi::c_char, mem_info_ptr: *const OrtMemoryInfo) -> OrtStatusPtr,
1047	pub GetBoundOutputNames: unsafe extern "system" fn(
1048		binding_ptr: *const OrtIoBinding,
1049		allocator: *mut OrtAllocator,
1050		buffer: *mut *mut core::ffi::c_char,
1051		lengths: *mut *mut usize,
1052		count: *mut usize
1053	) -> OrtStatusPtr,
1054	pub GetBoundOutputValues: unsafe extern "system" fn(
1055		binding_ptr: *const OrtIoBinding,
1056		allocator: *mut OrtAllocator,
1057		output: *mut *mut *mut OrtValue,
1058		output_count: *mut usize
1059	) -> OrtStatusPtr,
1060	#[doc = " \\brief Clears any previously set Inputs for an ::OrtIoBinding"]
1061	pub ClearBoundInputs: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding),
1062	#[doc = " \\brief Clears any previously set Outputs for an ::OrtIoBinding"]
1063	pub ClearBoundOutputs: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding),
1064	pub TensorAt: unsafe extern "system" fn(
1065		value: *mut OrtValue,
1066		location_values: *const i64,
1067		location_values_count: usize,
1068		out: *mut *mut core::ffi::c_void
1069	) -> OrtStatusPtr,
1070	pub CreateAndRegisterAllocator: unsafe extern "system" fn(env: *mut OrtEnv, mem_info: *const OrtMemoryInfo, arena_cfg: *const OrtArenaCfg) -> OrtStatusPtr,
1071	pub SetLanguageProjection: unsafe extern "system" fn(ort_env: *const OrtEnv, projection: OrtLanguageProjection) -> OrtStatusPtr,
1072	pub SessionGetProfilingStartTimeNs: unsafe extern "system" fn(session: *const OrtSession, out: *mut u64) -> OrtStatusPtr,
1073	pub SetGlobalIntraOpNumThreads: unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, intra_op_num_threads: core::ffi::c_int) -> OrtStatusPtr,
1074	pub SetGlobalInterOpNumThreads: unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, inter_op_num_threads: core::ffi::c_int) -> OrtStatusPtr,
1075	pub SetGlobalSpinControl: unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, allow_spinning: core::ffi::c_int) -> OrtStatusPtr,
1076	pub AddInitializer: unsafe extern "system" fn(options: *mut OrtSessionOptions, name: *const core::ffi::c_char, val: *const OrtValue) -> OrtStatusPtr,
1077	pub CreateEnvWithCustomLoggerAndGlobalThreadPools: unsafe extern "system" fn(
1078		logging_function: OrtLoggingFunction,
1079		logger_param: *mut core::ffi::c_void,
1080		log_severity_level: OrtLoggingLevel,
1081		logid: *const core::ffi::c_char,
1082		tp_options: *const OrtThreadingOptions,
1083		out: *mut *mut OrtEnv
1084	) -> OrtStatusPtr,
1085	pub SessionOptionsAppendExecutionProvider_CUDA:
1086		unsafe extern "system" fn(options: *mut OrtSessionOptions, cuda_options: *const OrtCUDAProviderOptions) -> OrtStatusPtr,
1087	pub SessionOptionsAppendExecutionProvider_ROCM:
1088		unsafe extern "system" fn(options: *mut OrtSessionOptions, rocm_options: *const OrtROCMProviderOptions) -> OrtStatusPtr,
1089	pub SessionOptionsAppendExecutionProvider_OpenVINO:
1090		unsafe extern "system" fn(options: *mut OrtSessionOptions, provider_options: *const OrtOpenVINOProviderOptions) -> OrtStatusPtr,
1091	pub SetGlobalDenormalAsZero: unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions) -> OrtStatusPtr,
1092	pub CreateArenaCfg: unsafe extern "system" fn(
1093		max_mem: usize,
1094		arena_extend_strategy: core::ffi::c_int,
1095		initial_chunk_size_bytes: core::ffi::c_int,
1096		max_dead_bytes_per_chunk: core::ffi::c_int,
1097		out: *mut *mut OrtArenaCfg
1098	) -> OrtStatusPtr,
1099	pub ReleaseArenaCfg: unsafe extern "system" fn(input: *mut OrtArenaCfg),
1100	pub ModelMetadataGetGraphDescription:
1101		unsafe extern "system" fn(model_metadata: *const OrtModelMetadata, allocator: *mut OrtAllocator, value: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1102	pub SessionOptionsAppendExecutionProvider_TensorRT:
1103		unsafe extern "system" fn(options: *mut OrtSessionOptions, tensorrt_options: *const OrtTensorRTProviderOptions) -> OrtStatusPtr,
1104	pub SetCurrentGpuDeviceId: unsafe extern "system" fn(device_id: core::ffi::c_int) -> OrtStatusPtr,
1105	pub GetCurrentGpuDeviceId: unsafe extern "system" fn(device_id: *mut core::ffi::c_int) -> OrtStatusPtr,
1106	pub KernelInfoGetAttributeArray_float:
1107		unsafe extern "system" fn(info: *const OrtKernelInfo, name: *const core::ffi::c_char, out: *mut f32, size: *mut usize) -> OrtStatusPtr,
1108	pub KernelInfoGetAttributeArray_int64:
1109		unsafe extern "system" fn(info: *const OrtKernelInfo, name: *const core::ffi::c_char, out: *mut i64, size: *mut usize) -> OrtStatusPtr,
1110	pub CreateArenaCfgV2: unsafe extern "system" fn(
1111		arena_config_keys: *const *const core::ffi::c_char,
1112		arena_config_values: *const usize,
1113		num_keys: usize,
1114		out: *mut *mut OrtArenaCfg
1115	) -> OrtStatusPtr,
1116	pub AddRunConfigEntry:
1117		unsafe extern "system" fn(options: *mut OrtRunOptions, config_key: *const core::ffi::c_char, config_value: *const core::ffi::c_char) -> OrtStatusPtr,
1118	pub CreatePrepackedWeightsContainer: unsafe extern "system" fn(out: *mut *mut OrtPrepackedWeightsContainer) -> OrtStatusPtr,
1119	pub ReleasePrepackedWeightsContainer: unsafe extern "system" fn(input: *mut OrtPrepackedWeightsContainer),
1120	pub CreateSessionWithPrepackedWeightsContainer: unsafe extern "system" fn(
1121		env: *const OrtEnv,
1122		model_path: *const ortchar,
1123		options: *const OrtSessionOptions,
1124		prepacked_weights_container: *mut OrtPrepackedWeightsContainer,
1125		out: *mut *mut OrtSession
1126	) -> OrtStatusPtr,
1127	pub CreateSessionFromArrayWithPrepackedWeightsContainer: unsafe extern "system" fn(
1128		env: *const OrtEnv,
1129		model_data: *const core::ffi::c_void,
1130		model_data_length: usize,
1131		options: *const OrtSessionOptions,
1132		prepacked_weights_container: *mut OrtPrepackedWeightsContainer,
1133		out: *mut *mut OrtSession
1134	) -> OrtStatusPtr,
1135	pub SessionOptionsAppendExecutionProvider_TensorRT_V2:
1136		unsafe extern "system" fn(options: *mut OrtSessionOptions, tensorrt_options: *const OrtTensorRTProviderOptionsV2) -> OrtStatusPtr,
1137	pub CreateTensorRTProviderOptions: unsafe extern "system" fn(out: *mut *mut OrtTensorRTProviderOptionsV2) -> OrtStatusPtr,
1138	pub UpdateTensorRTProviderOptions: unsafe extern "system" fn(
1139		tensorrt_options: *mut OrtTensorRTProviderOptionsV2,
1140		provider_options_keys: *const *const core::ffi::c_char,
1141		provider_options_values: *const *const core::ffi::c_char,
1142		num_keys: usize
1143	) -> OrtStatusPtr,
1144	pub GetTensorRTProviderOptionsAsString: unsafe extern "system" fn(
1145		tensorrt_options: *const OrtTensorRTProviderOptionsV2,
1146		allocator: *mut OrtAllocator,
1147		ptr: *mut *mut core::ffi::c_char
1148	) -> OrtStatusPtr,
1149	#[doc = " \\brief Release an ::OrtTensorRTProviderOptionsV2\n\n \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"]
1150	pub ReleaseTensorRTProviderOptions: unsafe extern "system" fn(input: *mut OrtTensorRTProviderOptionsV2),
1151	pub EnableOrtCustomOps: unsafe extern "system" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr,
1152	pub RegisterAllocator: unsafe extern "system" fn(env: *mut OrtEnv, allocator: *mut OrtAllocator) -> OrtStatusPtr,
1153	pub UnregisterAllocator: unsafe extern "system" fn(env: *mut OrtEnv, mem_info: *const OrtMemoryInfo) -> OrtStatusPtr,
1154	pub IsSparseTensor: unsafe extern "system" fn(value: *const OrtValue, out: *mut core::ffi::c_int) -> OrtStatusPtr,
1155	pub CreateSparseTensorAsOrtValue: unsafe extern "system" fn(
1156		allocator: *mut OrtAllocator,
1157		dense_shape: *const i64,
1158		dense_shape_len: usize,
1159		type_: ONNXTensorElementDataType,
1160		out: *mut *mut OrtValue
1161	) -> OrtStatusPtr,
1162	pub FillSparseTensorCoo: unsafe extern "system" fn(
1163		ort_value: *mut OrtValue,
1164		data_mem_info: *const OrtMemoryInfo,
1165		values_shape: *const i64,
1166		values_shape_len: usize,
1167		values: *const core::ffi::c_void,
1168		indices_data: *const i64,
1169		indices_num: usize
1170	) -> OrtStatusPtr,
1171	pub FillSparseTensorCsr: unsafe extern "system" fn(
1172		ort_value: *mut OrtValue,
1173		data_mem_info: *const OrtMemoryInfo,
1174		values_shape: *const i64,
1175		values_shape_len: usize,
1176		values: *const core::ffi::c_void,
1177		inner_indices_data: *const i64,
1178		inner_indices_num: usize,
1179		outer_indices_data: *const i64,
1180		outer_indices_num: usize
1181	) -> OrtStatusPtr,
1182	pub FillSparseTensorBlockSparse: unsafe extern "system" fn(
1183		ort_value: *mut OrtValue,
1184		data_mem_info: *const OrtMemoryInfo,
1185		values_shape: *const i64,
1186		values_shape_len: usize,
1187		values: *const core::ffi::c_void,
1188		indices_shape_data: *const i64,
1189		indices_shape_len: usize,
1190		indices_data: *const i32
1191	) -> OrtStatusPtr,
1192	pub CreateSparseTensorWithValuesAsOrtValue: unsafe extern "system" fn(
1193		info: *const OrtMemoryInfo,
1194		p_data: *mut core::ffi::c_void,
1195		dense_shape: *const i64,
1196		dense_shape_len: usize,
1197		values_shape: *const i64,
1198		values_shape_len: usize,
1199		type_: ONNXTensorElementDataType,
1200		out: *mut *mut OrtValue
1201	) -> OrtStatusPtr,
1202	pub UseCooIndices: unsafe extern "system" fn(ort_value: *mut OrtValue, indices_data: *mut i64, indices_num: usize) -> OrtStatusPtr,
1203	pub UseCsrIndices:
1204		unsafe extern "system" fn(ort_value: *mut OrtValue, inner_data: *mut i64, inner_num: usize, outer_data: *mut i64, outer_num: usize) -> OrtStatusPtr,
1205	pub UseBlockSparseIndices:
1206		unsafe extern "system" fn(ort_value: *mut OrtValue, indices_shape: *const i64, indices_shape_len: usize, indices_data: *mut i32) -> OrtStatusPtr,
1207	pub GetSparseTensorFormat: unsafe extern "system" fn(ort_value: *const OrtValue, out: *mut OrtSparseFormat) -> OrtStatusPtr,
1208	pub GetSparseTensorValuesTypeAndShape: unsafe extern "system" fn(ort_value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
1209	pub GetSparseTensorValues: unsafe extern "system" fn(ort_value: *const OrtValue, out: *mut *const core::ffi::c_void) -> OrtStatusPtr,
1210	pub GetSparseTensorIndicesTypeShape:
1211		unsafe extern "system" fn(ort_value: *const OrtValue, indices_format: OrtSparseIndicesFormat, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
1212	pub GetSparseTensorIndices: unsafe extern "system" fn(
1213		ort_value: *const OrtValue,
1214		indices_format: OrtSparseIndicesFormat,
1215		num_indices: *mut usize,
1216		indices: *mut *const core::ffi::c_void
1217	) -> OrtStatusPtr,
1218	pub HasValue: unsafe extern "system" fn(value: *const OrtValue, out: *mut core::ffi::c_int) -> OrtStatusPtr,
1219	pub KernelContext_GetGPUComputeStream: unsafe extern "system" fn(context: *const OrtKernelContext, out: *mut *mut core::ffi::c_void) -> OrtStatusPtr,
1220	pub GetTensorMemoryInfo: unsafe extern "system" fn(value: *const OrtValue, mem_info: *mut *const OrtMemoryInfo) -> OrtStatusPtr,
1221	pub GetExecutionProviderApi:
1222		unsafe extern "system" fn(provider_name: *const core::ffi::c_char, version: u32, provider_api: *mut *const core::ffi::c_void) -> OrtStatusPtr,
1223	pub SessionOptionsSetCustomCreateThreadFn:
1224		unsafe extern "system" fn(options: *mut OrtSessionOptions, ort_custom_create_thread_fn: OrtCustomCreateThreadFn) -> OrtStatusPtr,
1225	pub SessionOptionsSetCustomThreadCreationOptions:
1226		unsafe extern "system" fn(options: *mut OrtSessionOptions, ort_custom_thread_creation_options: *mut core::ffi::c_void) -> OrtStatusPtr,
1227	pub SessionOptionsSetCustomJoinThreadFn:
1228		unsafe extern "system" fn(options: *mut OrtSessionOptions, ort_custom_join_thread_fn: OrtCustomJoinThreadFn) -> OrtStatusPtr,
1229	pub SetGlobalCustomCreateThreadFn:
1230		unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, ort_custom_create_thread_fn: OrtCustomCreateThreadFn) -> OrtStatusPtr,
1231	pub SetGlobalCustomThreadCreationOptions:
1232		unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, ort_custom_thread_creation_options: *mut core::ffi::c_void) -> OrtStatusPtr,
1233	pub SetGlobalCustomJoinThreadFn:
1234		unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, ort_custom_join_thread_fn: OrtCustomJoinThreadFn) -> OrtStatusPtr,
1235	pub SynchronizeBoundInputs: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding) -> OrtStatusPtr,
1236	pub SynchronizeBoundOutputs: unsafe extern "system" fn(binding_ptr: *mut OrtIoBinding) -> OrtStatusPtr,
1237	pub SessionOptionsAppendExecutionProvider_CUDA_V2:
1238		unsafe extern "system" fn(options: *mut OrtSessionOptions, cuda_options: *const OrtCUDAProviderOptionsV2) -> OrtStatusPtr,
1239	pub CreateCUDAProviderOptions: unsafe extern "system" fn(out: *mut *mut OrtCUDAProviderOptionsV2) -> OrtStatusPtr,
1240	pub UpdateCUDAProviderOptions: unsafe extern "system" fn(
1241		cuda_options: *mut OrtCUDAProviderOptionsV2,
1242		provider_options_keys: *const *const core::ffi::c_char,
1243		provider_options_values: *const *const core::ffi::c_char,
1244		num_keys: usize
1245	) -> OrtStatusPtr,
1246	pub GetCUDAProviderOptionsAsString: unsafe extern "system" fn(
1247		cuda_options: *const OrtCUDAProviderOptionsV2,
1248		allocator: *mut OrtAllocator,
1249		ptr: *mut *mut core::ffi::c_char
1250	) -> OrtStatusPtr,
1251	#[doc = " \\brief Release an ::OrtCUDAProviderOptionsV2\n\n \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does\n\n \\since Version 1.11."]
1252	pub ReleaseCUDAProviderOptions: unsafe extern "system" fn(input: *mut OrtCUDAProviderOptionsV2),
1253	pub SessionOptionsAppendExecutionProvider_MIGraphX:
1254		unsafe extern "system" fn(options: *mut OrtSessionOptions, migraphx_options: *const OrtMIGraphXProviderOptions) -> OrtStatusPtr,
1255	pub AddExternalInitializers: unsafe extern "system" fn(
1256		options: *mut OrtSessionOptions,
1257		initializer_names: *const *const core::ffi::c_char,
1258		initializers: *const *const OrtValue,
1259		initializers_num: usize
1260	) -> OrtStatusPtr,
1261	pub CreateOpAttr: unsafe extern "system" fn(
1262		name: *const core::ffi::c_char,
1263		data: *const core::ffi::c_void,
1264		len: core::ffi::c_int,
1265		type_: OrtOpAttrType,
1266		op_attr: *mut *mut OrtOpAttr
1267	) -> OrtStatusPtr,
1268	pub ReleaseOpAttr: unsafe extern "system" fn(input: *mut OrtOpAttr),
1269	pub CreateOp: unsafe extern "system" fn(
1270		info: *const OrtKernelInfo,
1271		op_name: *const core::ffi::c_char,
1272		domain: *const core::ffi::c_char,
1273		version: core::ffi::c_int,
1274		type_constraint_names: *mut *const core::ffi::c_char,
1275		type_constraint_values: *const ONNXTensorElementDataType,
1276		type_constraint_count: core::ffi::c_int,
1277		attr_values: *const *const OrtOpAttr,
1278		attr_count: core::ffi::c_int,
1279		input_count: core::ffi::c_int,
1280		output_count: core::ffi::c_int,
1281		ort_op: *mut *mut OrtOp
1282	) -> OrtStatusPtr,
1283	pub InvokeOp: unsafe extern "system" fn(
1284		context: *const OrtKernelContext,
1285		ort_op: *const OrtOp,
1286		input_values: *const *const OrtValue,
1287		input_count: core::ffi::c_int,
1288		output_values: *const *mut OrtValue,
1289		output_count: core::ffi::c_int
1290	) -> OrtStatusPtr,
1291	pub ReleaseOp: unsafe extern "system" fn(input: *mut OrtOp),
1292	pub SessionOptionsAppendExecutionProvider: unsafe extern "system" fn(
1293		options: *mut OrtSessionOptions,
1294		provider_name: *const core::ffi::c_char,
1295		provider_options_keys: *const *const core::ffi::c_char,
1296		provider_options_values: *const *const core::ffi::c_char,
1297		num_keys: usize
1298	) -> OrtStatusPtr,
1299	pub CopyKernelInfo: unsafe extern "system" fn(info: *const OrtKernelInfo, info_copy: *mut *mut OrtKernelInfo) -> OrtStatusPtr,
1300	pub ReleaseKernelInfo: unsafe extern "system" fn(input: *mut OrtKernelInfo),
1301	#[doc = " \\name Ort Training\n @{\n** \\brief Gets the Training C Api struct\n*\n* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable\n* training with onnxruntime.\n* \\note A NULL pointer will be returned and no error message will be printed if the training api\n* is not supported with this build. A NULL pointer will be returned and an error message will be\n* printed if the provided version is unsupported, for example when using a runtime older than the\n* version created with this header file.\n*\n* \\param[in] version Must be ::ORT_API_VERSION\n* \\return The ::OrtTrainingApi struct for the version requested.\n*\n* \\since Version 1.13\n*/"]
1302	pub GetTrainingApi: unsafe extern "system" fn(version: u32) -> *const OrtTrainingApi,
1303	pub SessionOptionsAppendExecutionProvider_CANN:
1304		unsafe extern "system" fn(options: *mut OrtSessionOptions, cann_options: *const OrtCANNProviderOptions) -> OrtStatusPtr,
1305	pub CreateCANNProviderOptions: unsafe extern "system" fn(out: *mut *mut OrtCANNProviderOptions) -> OrtStatusPtr,
1306	pub UpdateCANNProviderOptions: unsafe extern "system" fn(
1307		cann_options: *mut OrtCANNProviderOptions,
1308		provider_options_keys: *const *const core::ffi::c_char,
1309		provider_options_values: *const *const core::ffi::c_char,
1310		num_keys: usize
1311	) -> OrtStatusPtr,
1312	pub GetCANNProviderOptionsAsString:
1313		unsafe extern "system" fn(cann_options: *const OrtCANNProviderOptions, allocator: *mut OrtAllocator, ptr: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1314	#[doc = " \\brief Release an OrtCANNProviderOptions\n\n \\param[in] the pointer of OrtCANNProviderOptions which will been deleted\n\n \\since Version 1.13."]
1315	pub ReleaseCANNProviderOptions: unsafe extern "system" fn(input: *mut OrtCANNProviderOptions),
1316	pub MemoryInfoGetDeviceType: unsafe extern "system" fn(ptr: *const OrtMemoryInfo, out: *mut OrtMemoryInfoDeviceType),
1317	pub UpdateEnvWithCustomLogLevel: unsafe extern "system" fn(ort_env: *mut OrtEnv, log_severity_level: OrtLoggingLevel) -> OrtStatusPtr,
1318	pub SetGlobalIntraOpThreadAffinity:
1319		unsafe extern "system" fn(tp_options: *mut OrtThreadingOptions, affinity_string: *const core::ffi::c_char) -> OrtStatusPtr,
1320	pub RegisterCustomOpsLibrary_V2: unsafe extern "system" fn(options: *mut OrtSessionOptions, library_name: *const ortchar) -> OrtStatusPtr,
1321	pub RegisterCustomOpsUsingFunction:
1322		unsafe extern "system" fn(options: *mut OrtSessionOptions, registration_func_name: *const core::ffi::c_char) -> OrtStatusPtr,
1323	pub KernelInfo_GetInputCount: unsafe extern "system" fn(info: *const OrtKernelInfo, out: *mut usize) -> OrtStatusPtr,
1324	pub KernelInfo_GetOutputCount: unsafe extern "system" fn(info: *const OrtKernelInfo, out: *mut usize) -> OrtStatusPtr,
1325	pub KernelInfo_GetInputName:
1326		unsafe extern "system" fn(info: *const OrtKernelInfo, index: usize, out: *mut core::ffi::c_char, size: *mut usize) -> OrtStatusPtr,
1327	pub KernelInfo_GetOutputName:
1328		unsafe extern "system" fn(info: *const OrtKernelInfo, index: usize, out: *mut core::ffi::c_char, size: *mut usize) -> OrtStatusPtr,
1329	pub KernelInfo_GetInputTypeInfo: unsafe extern "system" fn(info: *const OrtKernelInfo, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
1330	pub KernelInfo_GetOutputTypeInfo: unsafe extern "system" fn(info: *const OrtKernelInfo, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
1331	pub KernelInfoGetAttribute_tensor: unsafe extern "system" fn(
1332		info: *const OrtKernelInfo,
1333		name: *const core::ffi::c_char,
1334		allocator: *mut OrtAllocator,
1335		out: *mut *mut OrtValue
1336	) -> OrtStatusPtr,
1337	pub HasSessionConfigEntry:
1338		unsafe extern "system" fn(options: *const OrtSessionOptions, config_key: *const core::ffi::c_char, out: *mut core::ffi::c_int) -> OrtStatusPtr,
1339	pub GetSessionConfigEntry: unsafe extern "system" fn(
1340		options: *const OrtSessionOptions,
1341		config_key: *const core::ffi::c_char,
1342		config_value: *mut core::ffi::c_char,
1343		size: *mut usize
1344	) -> OrtStatusPtr,
1345	pub SessionOptionsAppendExecutionProvider_Dnnl:
1346		unsafe extern "system" fn(options: *mut OrtSessionOptions, dnnl_options: *const OrtDnnlProviderOptions) -> OrtStatusPtr,
1347	pub CreateDnnlProviderOptions: unsafe extern "system" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
1348	pub UpdateDnnlProviderOptions: unsafe extern "system" fn(
1349		dnnl_options: *mut OrtDnnlProviderOptions,
1350		provider_options_keys: *const *const core::ffi::c_char,
1351		provider_options_values: *const *const core::ffi::c_char,
1352		num_keys: usize
1353	) -> OrtStatusPtr,
1354	pub GetDnnlProviderOptionsAsString:
1355		unsafe extern "system" fn(dnnl_options: *const OrtDnnlProviderOptions, allocator: *mut OrtAllocator, ptr: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1356	#[doc = " \\brief Release an ::OrtDnnlProviderOptions\n\n \\since Version 1.15."]
1357	pub ReleaseDnnlProviderOptions: unsafe extern "system" fn(input: *mut OrtDnnlProviderOptions),
1358	pub KernelInfo_GetNodeName: unsafe extern "system" fn(info: *const OrtKernelInfo, out: *mut core::ffi::c_char, size: *mut usize) -> OrtStatusPtr,
1359	pub KernelInfo_GetLogger: unsafe extern "system" fn(info: *const OrtKernelInfo, logger: *mut *const OrtLogger) -> OrtStatusPtr,
1360	pub KernelContext_GetLogger: unsafe extern "system" fn(context: *const OrtKernelContext, logger: *mut *const OrtLogger) -> OrtStatusPtr,
1361	pub Logger_LogMessage: unsafe extern "system" fn(
1362		logger: *const OrtLogger,
1363		log_severity_level: OrtLoggingLevel,
1364		message: *const core::ffi::c_char,
1365		file_path: *const ortchar,
1366		line_number: core::ffi::c_int,
1367		func_name: *const core::ffi::c_char
1368	) -> OrtStatusPtr,
1369	pub Logger_GetLoggingSeverityLevel: unsafe extern "system" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
1370	pub KernelInfoGetConstantInput_tensor:
1371		unsafe extern "system" fn(info: *const OrtKernelInfo, index: usize, is_constant: *mut core::ffi::c_int, out: *mut *const OrtValue) -> OrtStatusPtr,
1372	pub CastTypeInfoToOptionalTypeInfo: unsafe extern "system" fn(type_info: *const OrtTypeInfo, out: *mut *const OrtOptionalTypeInfo) -> OrtStatusPtr,
1373	pub GetOptionalContainedTypeInfo: unsafe extern "system" fn(optional_type_info: *const OrtOptionalTypeInfo, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr,
1374	pub GetResizedStringTensorElementBuffer:
1375		unsafe extern "system" fn(value: *mut OrtValue, index: usize, length_in_bytes: usize, buffer: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1376	pub KernelContext_GetAllocator:
1377		unsafe extern "system" fn(context: *const OrtKernelContext, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr,
1378	#[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags\n\n \\return UTF-8 encoded version string. Do not deallocate the returned buffer.\n\n \\since Version 1.15."]
1379	pub GetBuildInfoString: unsafe extern "system" fn() -> *const core::ffi::c_char,
1380	pub CreateROCMProviderOptions: unsafe extern "system" fn(out: *mut *mut OrtROCMProviderOptions) -> OrtStatusPtr,
1381	pub UpdateROCMProviderOptions: unsafe extern "system" fn(
1382		rocm_options: *mut OrtROCMProviderOptions,
1383		provider_options_keys: *const *const core::ffi::c_char,
1384		provider_options_values: *const *const core::ffi::c_char,
1385		num_keys: usize
1386	) -> OrtStatusPtr,
1387	pub GetROCMProviderOptionsAsString:
1388		unsafe extern "system" fn(rocm_options: *const OrtROCMProviderOptions, allocator: *mut OrtAllocator, ptr: *mut *mut core::ffi::c_char) -> OrtStatusPtr,
1389	#[doc = " \\brief Release an ::OrtROCMProviderOptions\n\n \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does\n\n \\since Version 1.16."]
1390	pub ReleaseROCMProviderOptions: unsafe extern "system" fn(input: *mut OrtROCMProviderOptions),
1391	pub CreateAndRegisterAllocatorV2: unsafe extern "system" fn(
1392		env: *mut OrtEnv,
1393		provider_type: *const core::ffi::c_char,
1394		mem_info: *const OrtMemoryInfo,
1395		arena_cfg: *const OrtArenaCfg,
1396		provider_options_keys: *const *const core::ffi::c_char,
1397		provider_options_values: *const *const core::ffi::c_char,
1398		num_keys: usize
1399	) -> OrtStatusPtr,
1400	pub RunAsync: unsafe extern "system" fn(
1401		session: *mut OrtSession,
1402		run_options: *const OrtRunOptions,
1403		input_names: *const *const core::ffi::c_char,
1404		input: *const *const OrtValue,
1405		input_len: usize,
1406		output_names: *const *const core::ffi::c_char,
1407		output_names_len: usize,
1408		output: *mut *mut OrtValue,
1409		run_async_callback: RunAsyncCallbackFn,
1410		user_data: *mut core::ffi::c_void
1411	) -> OrtStatusPtr,
1412	pub UpdateTensorRTProviderOptionsWithValue: unsafe extern "system" fn(
1413		tensorrt_options: *mut OrtTensorRTProviderOptionsV2,
1414		key: *const core::ffi::c_char,
1415		value: *mut core::ffi::c_void
1416	) -> OrtStatusPtr,
1417	pub GetTensorRTProviderOptionsByName: unsafe extern "system" fn(
1418		tensorrt_options: *const OrtTensorRTProviderOptionsV2,
1419		key: *const core::ffi::c_char,
1420		ptr: *mut *mut core::ffi::c_void
1421	) -> OrtStatusPtr,
1422	pub UpdateCUDAProviderOptionsWithValue:
1423		unsafe extern "system" fn(cuda_options: *mut OrtCUDAProviderOptionsV2, key: *const core::ffi::c_char, value: *mut core::ffi::c_void) -> OrtStatusPtr,
1424	pub GetCUDAProviderOptionsByName: unsafe extern "system" fn(
1425		cuda_options: *const OrtCUDAProviderOptionsV2,
1426		key: *const core::ffi::c_char,
1427		ptr: *mut *mut core::ffi::c_void
1428	) -> OrtStatusPtr,
1429	pub KernelContext_GetResource: unsafe extern "system" fn(
1430		context: *const OrtKernelContext,
1431		resouce_version: core::ffi::c_int,
1432		resource_id: core::ffi::c_int,
1433		resource: *mut *mut core::ffi::c_void
1434	) -> OrtStatusPtr,
1435	pub SetUserLoggingFunction: unsafe extern "system" fn(
1436		options: *mut OrtSessionOptions,
1437		user_logging_function: OrtLoggingFunction,
1438		user_logging_param: *mut core::ffi::c_void
1439	) -> OrtStatusPtr,
1440	pub ShapeInferContext_GetInputCount: unsafe extern "system" fn(context: *const OrtShapeInferContext, out: *mut usize) -> OrtStatusPtr,
1441	pub ShapeInferContext_GetInputTypeShape:
1442		unsafe extern "system" fn(context: *const OrtShapeInferContext, index: usize, info: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
1443	pub ShapeInferContext_GetAttribute:
1444		unsafe extern "system" fn(context: *const OrtShapeInferContext, attr_name: *const core::ffi::c_char, attr: *mut *const OrtOpAttr) -> OrtStatusPtr,
1445	pub ShapeInferContext_SetOutputTypeShape:
1446		unsafe extern "system" fn(context: *const OrtShapeInferContext, index: usize, info: *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr,
1447	pub SetSymbolicDimensions:
1448		unsafe extern "system" fn(info: *mut OrtTensorTypeAndShapeInfo, dim_params: *mut *const core::ffi::c_char, dim_params_length: usize) -> OrtStatusPtr,
1449	pub ReadOpAttr:
1450		unsafe extern "system" fn(op_attr: *const OrtOpAttr, type_: OrtOpAttrType, data: *mut core::ffi::c_void, len: usize, out: *mut usize) -> OrtStatusPtr,
1451	pub SetDeterministicCompute: unsafe extern "system" fn(options: *mut OrtSessionOptions, value: bool) -> OrtStatusPtr,
1452	pub KernelContext_ParallelFor: unsafe extern "system" fn(
1453		context: *const OrtKernelContext,
1454		fn_: unsafe extern "system" fn(arg1: *mut core::ffi::c_void, arg2: usize),
1455		total: usize,
1456		num_batch: usize,
1457		usr_data: *mut core::ffi::c_void
1458	) -> OrtStatusPtr,
1459	pub SessionOptionsAppendExecutionProvider_OpenVINO_V2: unsafe extern "system" fn(
1460		options: *mut OrtSessionOptions,
1461		provider_options_keys: *const *const core::ffi::c_char,
1462		provider_options_values: *const *const core::ffi::c_char,
1463		num_keys: usize
1464	) -> OrtStatusPtr,
1465	pub SessionOptionsAppendExecutionProvider_VitisAI: unsafe extern "system" fn(
1466		options: *mut OrtSessionOptions,
1467		provider_options_keys: *const *const core::ffi::c_char,
1468		provider_options_values: *const *const core::ffi::c_char,
1469		num_keys: usize
1470	) -> OrtStatusPtr,
1471	pub KernelContext_GetScratchBuffer: unsafe extern "system" fn(
1472		context: *const OrtKernelContext,
1473		mem_info: *const OrtMemoryInfo,
1474		count_or_bytes: usize,
1475		out: *mut *mut core::ffi::c_void
1476	) -> OrtStatusPtr,
1477	pub KernelInfoGetAllocator: unsafe extern "system" fn(info: *const OrtKernelInfo, mem_type: OrtMemType, out: *mut *mut OrtAllocator) -> OrtStatusPtr,
1478	pub AddExternalInitializersFromMemory: unsafe extern "system" fn(
1479		options: *mut OrtSessionOptions,
1480		external_initializer_file_names: *const *const ortchar,
1481		external_initializer_file_buffer_array: *const *mut core::ffi::c_char,
1482		external_initializer_file_lengths: *const usize,
1483		num_external_initializer_files: usize
1484	) -> OrtStatusPtr,
1485	pub CreateLoraAdapter:
1486		unsafe extern "system" fn(adapter_file_path: *const ortchar, allocator: *mut OrtAllocator, out: *mut *mut OrtLoraAdapter) -> OrtStatusPtr,
1487	pub CreateLoraAdapterFromArray: unsafe extern "system" fn(
1488		bytes: *const core::ffi::c_void,
1489		num_bytes: usize,
1490		allocator: *mut OrtAllocator,
1491		out: *mut *mut OrtLoraAdapter
1492	) -> OrtStatusPtr,
1493	pub ReleaseLoraAdapter: unsafe extern "system" fn(input: *mut OrtLoraAdapter),
1494	pub RunOptionsAddActiveLoraAdapter: unsafe extern "system" fn(options: *mut OrtRunOptions, adapter: *const OrtLoraAdapter) -> OrtStatusPtr,
1495	pub SetEpDynamicOptions: unsafe extern "system" fn(
1496		sess: *mut OrtSession,
1497		keys: *const *const core::ffi::c_char,
1498		values: *const *const core::ffi::c_char,
1499		kv_len: usize
1500	) -> OrtStatusPtr,
1501	pub ReleaseValueInfo: unsafe extern "system" fn(input: *mut OrtValueInfo),
1502	pub ReleaseNode: unsafe extern "system" fn(input: *mut OrtNode),
1503	pub ReleaseGraph: unsafe extern "system" fn(input: *mut OrtGraph),
1504	pub ReleaseModel: unsafe extern "system" fn(input: *mut OrtModel),
1505	pub GetValueInfoName: unsafe extern "system" fn(value_info: *const OrtValueInfo, name: *mut *const c_char) -> OrtStatusPtr,
1506	pub GetValueInfoTypeInfo: unsafe extern "system" fn(value_info: *const OrtValueInfo, type_info: *mut *const OrtTypeInfo) -> OrtStatusPtr,
1507	pub GetModelEditorApi: unsafe extern "system" fn() -> *const OrtModelEditorApi,
1508	pub CreateTensorWithDataAndDeleterAsOrtValue: unsafe extern "system" fn(
1509		deleter: *mut OrtAllocator,
1510		p_data: *mut c_void,
1511		p_data_len: usize,
1512		shape: *const i64,
1513		shape_len: usize,
1514		r#type: ONNXTensorElementDataType,
1515		out: *mut *mut OrtValue
1516	) -> OrtStatusPtr,
1517	pub SessionOptionsSetLoadCancellationFlag: unsafe extern "system" fn(options: *mut OrtSessionOptions, cancel: bool) -> OrtStatusPtr,
1518	pub GetCompileApi: unsafe extern "system" fn() -> *const OrtCompileApi,
1519	pub CreateKeyValuePairs: unsafe extern "system" fn(out: *mut *mut OrtKeyValuePairs),
1520	pub AddKeyValuePair: unsafe extern "system" fn(kvps: *mut OrtKeyValuePairs, key: *const c_char, value: *const c_char),
1521	pub GetKeyValue: unsafe extern "system" fn(kvps: *const OrtKeyValuePairs, key: *const c_char) -> *const c_char,
1522	pub GetKeyValuePairs:
1523		unsafe extern "system" fn(kvps: *const OrtKeyValuePairs, keys: *mut *const *const c_char, values: *mut *const *const c_char, num_entries: *mut usize),
1524	pub RemoveKeyValuePair: unsafe extern "system" fn(kvps: *mut OrtKeyValuePairs, key: *const c_char),
1525	pub ReleaseKeyValuePairs: unsafe extern "system" fn(input: *mut OrtKeyValuePairs),
1526	pub RegisterExecutionProviderLibrary: unsafe extern "system" fn(env: *mut OrtEnv, registration_name: *const c_char, path: *const ortchar) -> OrtStatusPtr,
1527	pub UnregisterExecutionProviderLibrary: unsafe extern "system" fn(env: *mut OrtEnv, registration_name: *const c_char) -> OrtStatusPtr,
1528	pub GetEpDevices: unsafe extern "system" fn(env: *const OrtEnv, ep_devices: *mut *const *const OrtEpDevice, num_ep_devices: *mut usize) -> OrtStatusPtr,
1529	pub SessionOptionsAppendExecutionProvider_V2: unsafe extern "system" fn(
1530		session_options: *mut OrtSessionOptions,
1531		env: *mut OrtEnv,
1532		ep_devices: *const *const OrtEpDevice,
1533		num_ep_devices: usize,
1534		ep_option_keys: *const *const c_char,
1535		ep_option_vals: *const *const c_char,
1536		num_ep_options: usize
1537	) -> OrtStatusPtr,
1538	pub SessionOptionsSetEpSelectionPolicy:
1539		unsafe extern "system" fn(session_options: *mut OrtSessionOptions, policy: OrtExecutionProviderDevicePolicy) -> OrtStatusPtr,
1540	pub SessionOptionsSetEpSelectionPolicyDelegate:
1541		unsafe extern "system" fn(session_options: *mut OrtSessionOptions, delegate: EpSelectionDelegate, delegate_state: *mut c_void) -> OrtStatusPtr,
1542	pub HardwareDevice_Type: unsafe extern "system" fn(device: *const OrtHardwareDevice) -> OrtHardwareDeviceType,
1543	pub HardwareDevice_VendorId: unsafe extern "system" fn(device: *const OrtHardwareDevice) -> u32,
1544	pub HardwareDevice_Vendor: unsafe extern "system" fn(device: *const OrtHardwareDevice) -> *const c_char,
1545	pub HardwareDevice_DeviceId: unsafe extern "system" fn(device: *const OrtHardwareDevice) -> u32,
1546	pub HardwareDevice_Metadata: unsafe extern "system" fn(device: *const OrtHardwareDevice) -> *const OrtKeyValuePairs,
1547	pub EpDevice_EpName: unsafe extern "system" fn(ep_device: *const OrtEpDevice) -> *const c_char,
1548	pub EpDevice_EpVendor: unsafe extern "system" fn(ep_device: *const OrtEpDevice) -> *const c_char,
1549	pub EpDevice_EpMetadata: unsafe extern "system" fn(ep_device: *const OrtEpDevice) -> *const OrtKeyValuePairs,
1550	pub EpDevice_EpOptions: unsafe extern "system" fn(ep_device: *const OrtEpDevice) -> *const OrtKeyValuePairs,
1551	pub EpDevice_Device: unsafe extern "system" fn(ep_device: *const OrtEpDevice) -> *const OrtHardwareDevice,
1552	pub GetEpApi: unsafe extern "system" fn() -> *const OrtEpApi
1553}
1554#[repr(i32)]
1555#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1556pub enum OrtCustomOpInputOutputCharacteristic {
1557	INPUT_OUTPUT_REQUIRED = 0,
1558	INPUT_OUTPUT_OPTIONAL = 1,
1559	INPUT_OUTPUT_VARIADIC = 2
1560}
1561#[repr(C)]
1562#[derive(Debug, Copy, Clone)]
1563pub struct OrtCustomOp {
1564	pub version: u32,
1565	pub CreateKernel: Option<unsafe extern "system" fn(op: *const OrtCustomOp, api: *const OrtApi, info: *const OrtKernelInfo) -> *mut core::ffi::c_void>,
1566	pub GetName: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> *const core::ffi::c_char>,
1567	pub GetExecutionProviderType: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> *const core::ffi::c_char>,
1568	pub GetInputType: Option<unsafe extern "system" fn(op: *const OrtCustomOp, index: usize) -> ONNXTensorElementDataType>,
1569	pub GetInputTypeCount: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> usize>,
1570	pub GetOutputType: Option<unsafe extern "system" fn(op: *const OrtCustomOp, index: usize) -> ONNXTensorElementDataType>,
1571	pub GetOutputTypeCount: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> usize>,
1572	pub KernelCompute: Option<unsafe extern "system" fn(op_kernel: *mut core::ffi::c_void, context: *mut OrtKernelContext)>,
1573	pub KernelDestroy: Option<unsafe extern "system" fn(op_kernel: *mut core::ffi::c_void)>,
1574	pub GetInputCharacteristic: Option<unsafe extern "system" fn(op: *const OrtCustomOp, index: usize) -> OrtCustomOpInputOutputCharacteristic>,
1575	pub GetOutputCharacteristic: Option<unsafe extern "system" fn(op: *const OrtCustomOp, index: usize) -> OrtCustomOpInputOutputCharacteristic>,
1576	pub GetInputMemoryType: Option<unsafe extern "system" fn(op: *const OrtCustomOp, index: usize) -> OrtMemType>,
1577	pub GetVariadicInputMinArity: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1578	pub GetVariadicInputHomogeneity: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1579	pub GetVariadicOutputMinArity: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1580	pub GetVariadicOutputHomogeneity: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1581	pub CreateKernelV2: Option<
1582		unsafe extern "system" fn(op: *const OrtCustomOp, api: *const OrtApi, info: *const OrtKernelInfo, kernel: *mut *mut core::ffi::c_void) -> OrtStatusPtr
1583	>,
1584	pub KernelComputeV2: Option<unsafe extern "system" fn(op_kernel: *mut core::ffi::c_void, context: *mut OrtKernelContext) -> OrtStatusPtr>,
1585	pub InferOutputShapeFn: Option<unsafe extern "system" fn(op: *const OrtCustomOp, arg1: *mut OrtShapeInferContext) -> OrtStatusPtr>,
1586	pub GetStartVersion: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1587	pub GetEndVersion: Option<unsafe extern "system" fn(op: *const OrtCustomOp) -> core::ffi::c_int>,
1588	pub GetMayInplace: Option<unsafe extern "system" fn(input_index: *mut *mut core::ffi::c_int, output_index: *mut *mut core::ffi::c_int) -> usize>,
1589	pub ReleaseMayInplace: Option<unsafe extern "system" fn(input_index: *mut core::ffi::c_int, output_index: *mut *mut core::ffi::c_int)>,
1590	pub GetAliasMap: Option<unsafe extern "system" fn(input_index: *mut *mut core::ffi::c_int, output_index: *mut *mut core::ffi::c_int) -> usize>,
1591	pub ReleaseAliasMap: Option<unsafe extern "system" fn(input_index: *mut core::ffi::c_int, output_index: *mut *mut core::ffi::c_int)>
1592}
1593extern "system" {
1594	pub fn OrtSessionOptionsAppendExecutionProvider_CUDA(options: *mut OrtSessionOptions, device_id: core::ffi::c_int) -> OrtStatusPtr;
1595	pub fn OrtSessionOptionsAppendExecutionProvider_ROCM(options: *mut OrtSessionOptions, device_id: core::ffi::c_int) -> OrtStatusPtr;
1596	pub fn OrtSessionOptionsAppendExecutionProvider_MIGraphX(options: *mut OrtSessionOptions, device_id: core::ffi::c_int) -> OrtStatusPtr;
1597	pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(options: *mut OrtSessionOptions, use_arena: core::ffi::c_int) -> OrtStatusPtr;
1598	pub fn OrtSessionOptionsAppendExecutionProvider_Tensorrt(options: *mut OrtSessionOptions, device_id: core::ffi::c_int) -> OrtStatusPtr;
1599}