diff --git a/README.md b/README.md
index a025ed51..d07b6951 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,18 @@
+# VOICEVOX ONNX Runtime
+
+onnxruntime-rsのフォークです。onnxruntimeのバージョンなどをVOICEVOX独自のものに合わせています。
+
+## onnxruntime のバージョン更新方法
+
+0. forkし、fork先のリポジトリの `Workflow permissions` で書き込み権限やプルリクエスト作成権限を付与しておく
+1. `onnxruntime-sys` の `build.rs` にある `ORT_VERSION` 定数のバージョンを更新
+2. GithubにpushするとCIからヘッダー更新のプルリクエストが届くので全部マージする
+3. このリポジトリにプルリクエストを出す
+
+---
+
+以下は元リポジトリの README です。
+
# ONNX Runtime
[](https://github.com/nbigaouette/onnxruntime-rs)
diff --git a/onnxruntime-sys/build.rs b/onnxruntime-sys/build.rs
index 08d6e1b9..0d4ecfd2 100644
--- a/onnxruntime-sys/build.rs
+++ b/onnxruntime-sys/build.rs
@@ -13,7 +13,7 @@ use std::{
/// WARNING: If version is changed, bindings for all platforms will have to be re-generated.
/// To do so, run this:
/// cargo build --package onnxruntime-sys --features generate-bindings
-const ORT_VERSION: &str = "1.14.0";
+const ORT_VERSION: &str = "1.15.1";
/// Base Url from which to download pre-built releases/
const ORT_RELEASE_BASE_URL: &str = "https://github.com/microsoft/onnxruntime/releases/download";
diff --git a/onnxruntime-sys/src/generated/android/aarch64/bindings.rs b/onnxruntime-sys/src/generated/android/aarch64/bindings.rs
index 1c6d82ec..596a2918 100644
--- a/onnxruntime-sys/src/generated/android/aarch64/bindings.rs
+++ b/onnxruntime-sys/src/generated/android/aarch64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
@@ -146,22 +146,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -206,6 +211,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -214,6 +224,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -332,8 +347,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -445,10 +460,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -598,23 +617,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -653,10 +689,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -806,23 +846,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1253,7 +1310,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1432,8 +1489,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2826,6 +2888,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2945,12 +3023,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7057,6 +7238,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7442,3 +7898,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/android/x86_64/bindings.rs b/onnxruntime-sys/src/generated/android/x86_64/bindings.rs
index 1c6d82ec..596a2918 100644
--- a/onnxruntime-sys/src/generated/android/x86_64/bindings.rs
+++ b/onnxruntime-sys/src/generated/android/x86_64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
@@ -146,22 +146,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -206,6 +211,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -214,6 +224,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -332,8 +347,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -445,10 +460,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -598,23 +617,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -653,10 +689,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -806,23 +846,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1253,7 +1310,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1432,8 +1489,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2826,6 +2888,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2945,12 +3023,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7057,6 +7238,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7442,3 +7898,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs b/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs
index 1c6d82ec..596a2918 100644
--- a/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs
+++ b/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
@@ -146,22 +146,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -206,6 +211,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -214,6 +224,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -332,8 +347,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -445,10 +460,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -598,23 +617,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -653,10 +689,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -806,23 +846,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1253,7 +1310,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1432,8 +1489,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2826,6 +2888,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2945,12 +3023,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7057,6 +7238,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7442,3 +7898,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs b/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs
index 1c6d82ec..596a2918 100644
--- a/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs
+++ b/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
@@ -146,22 +146,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -206,6 +211,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -214,6 +224,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -332,8 +347,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -445,10 +460,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -598,23 +617,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -653,10 +689,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -806,23 +846,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1253,7 +1310,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1432,8 +1489,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2826,6 +2888,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2945,12 +3023,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7057,6 +7238,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7442,3 +7898,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/macos/aarch64/bindings.rs b/onnxruntime-sys/src/generated/macos/aarch64/bindings.rs
index afa6b008..4e9496ed 100644
--- a/onnxruntime-sys/src/generated/macos/aarch64/bindings.rs
+++ b/onnxruntime-sys/src/generated/macos/aarch64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
#[repr(u32)]
#[doc = " Copied from TensorProto::DataType"]
@@ -143,22 +143,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -203,6 +208,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -211,6 +221,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -329,8 +344,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -442,10 +457,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -595,23 +614,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -650,10 +686,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -803,23 +843,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1250,7 +1307,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1429,8 +1486,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2823,6 +2885,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2942,12 +3020,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7054,6 +7235,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7439,3 +7895,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/macos/x86_64/bindings.rs b/onnxruntime-sys/src/generated/macos/x86_64/bindings.rs
index afa6b008..4e9496ed 100644
--- a/onnxruntime-sys/src/generated/macos/x86_64/bindings.rs
+++ b/onnxruntime-sys/src/generated/macos/x86_64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
#[repr(u32)]
#[doc = " Copied from TensorProto::DataType"]
@@ -143,22 +143,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -203,6 +208,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -211,6 +221,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -329,8 +344,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(u32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -442,10 +457,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -595,23 +614,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -650,10 +686,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -803,23 +843,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1250,7 +1307,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1429,8 +1486,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2823,6 +2885,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2942,12 +3020,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const ::std::os::raw::c_char,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7054,6 +7235,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7439,3 +7895,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/windows/x86/bindings.rs b/onnxruntime-sys/src/generated/windows/x86/bindings.rs
index 77931f08..09a391d8 100644
--- a/onnxruntime-sys/src/generated/windows/x86/bindings.rs
+++ b/onnxruntime-sys/src/generated/windows/x86/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type wchar_t = ::std::os::raw::c_ushort;
#[repr(i32)]
#[doc = " Copied from TensorProto::DataType"]
@@ -143,22 +143,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -203,6 +208,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -211,6 +221,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -332,8 +347,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(i32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -445,16 +460,20 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
assert_eq!(
::std::mem::size_of::(),
- 36usize,
+ 40usize,
concat!("Size of: ", stringify!(OrtCUDAProviderOptions))
);
assert_eq!(
@@ -598,23 +617,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -653,16 +689,20 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
assert_eq!(
::std::mem::size_of::(),
- 36usize,
+ 40usize,
concat!("Size of: ", stringify!(OrtROCMProviderOptions))
);
assert_eq!(
@@ -806,23 +846,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 36usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1253,7 +1310,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1432,8 +1489,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2869,6 +2931,22 @@ pub struct OrtApi {
>,
pub ReleaseKernelInfo:
::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2988,12 +3066,118 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "stdcall" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const wchar_t,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ logger: *const OrtLogger,
+ out: *mut OrtLoggingLevel,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "stdcall" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 956usize,
+ 1020usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7100,6 +7284,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 956usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 964usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 972usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 980usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 988usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 996usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 1000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 1004usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 1008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 1012usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 1016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7491,3 +7950,9 @@ extern "stdcall" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "stdcall" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs b/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs
index 84c61085..ca72c4ef 100644
--- a/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs
+++ b/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type wchar_t = ::std::os::raw::c_ushort;
#[repr(i32)]
#[doc = " Copied from TensorProto::DataType"]
@@ -143,22 +143,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -203,6 +208,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -211,6 +221,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -329,8 +344,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(i32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -442,10 +457,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -595,23 +614,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -650,10 +686,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -803,23 +843,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -1250,7 +1307,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -1429,8 +1486,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -2823,6 +2885,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -2942,12 +3020,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const wchar_t,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -7054,6 +7235,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -7439,3 +7895,9 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
diff --git a/onnxruntime-sys/src/generated/windows/x86_64/bindings_directml.rs b/onnxruntime-sys/src/generated/windows/x86_64/bindings_directml.rs
index c9943825..4303ad34 100644
--- a/onnxruntime-sys/src/generated/windows/x86_64/bindings_directml.rs
+++ b/onnxruntime-sys/src/generated/windows/x86_64/bindings_directml.rs
@@ -1,6 +1,6 @@
/* automatically generated by rust-bindgen 0.60.1 */
-pub const ORT_API_VERSION: u32 = 14;
+pub const ORT_API_VERSION: u32 = 15;
pub type wchar_t = ::std::os::raw::c_ushort;
pub type ULONG = ::std::os::raw::c_ulong;
pub type BOOL = ::std::os::raw::c_int;
@@ -3197,22 +3197,27 @@ pub struct OrtTensorTypeAndShapeInfo {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSessionOptions {
+pub struct OrtMapTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtCustomOpDomain {
+pub struct OrtSequenceTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtMapTypeInfo {
+pub struct OrtOptionalTypeInfo {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
-pub struct OrtSequenceTypeInfo {
+pub struct OrtSessionOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtCustomOpDomain {
_unused: [u8; 0],
}
#[repr(C)]
@@ -3257,6 +3262,11 @@ pub struct OrtCANNProviderOptions {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
+pub struct OrtDnnlProviderOptions {
+ _unused: [u8; 0],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
pub struct OrtOp {
_unused: [u8; 0],
}
@@ -3265,6 +3275,11 @@ pub struct OrtOp {
pub struct OrtOpAttr {
_unused: [u8; 0],
}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct OrtLogger {
+ _unused: [u8; 0],
+}
pub type OrtStatusPtr = *mut OrtStatus;
#[doc = " \\brief Memory allocation interface"]
#[doc = ""]
@@ -3383,8 +3398,8 @@ pub type OrtLoggingFunction = ::std::option::Option<
#[repr(i32)]
#[doc = " \\brief Graph optimization level"]
#[doc = ""]
-#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"]
-#[doc = " for an in-depth understanding of Graph Optimizations"]
+#[doc = " Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels"]
+#[doc = " for an in-depth understanding of the Graph Optimization Levels."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum GraphOptimizationLevel {
ORT_DISABLE_ALL = 0,
@@ -3496,10 +3511,14 @@ pub struct OrtCUDAProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief CUDA memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtCUDAProviderOptions() {
@@ -3649,23 +3668,40 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtCUDAProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtCUDAProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
+ )
+ );
+ }
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief ROCM Provider Options"]
#[doc = ""]
@@ -3704,10 +3740,14 @@ pub struct OrtROCMProviderOptions {
pub user_compute_stream: *mut ::std::os::raw::c_void,
#[doc = " \\brief ROCM memory arena configuration parameters"]
pub default_memory_arena_cfg: *mut OrtArenaCfg,
- #[doc = " \\brief Enable TunableOp."]
- #[doc = " Set it to 1 to enable TunableOp. Otherwise, it is disabled by default."]
- #[doc = " This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED."]
- pub tunable_op_enabled: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for using."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE."]
+ pub tunable_op_enable: ::std::os::raw::c_int,
+ #[doc = " \\brief Enable TunableOp for tuning."]
+ #[doc = " Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default."]
+ #[doc = " This option can be overriden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE."]
+ pub tunable_op_tuning_enable: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_OrtROCMProviderOptions() {
@@ -3857,23 +3897,40 @@ fn bindgen_test_layout_OrtROCMProviderOptions() {
);
}
test_field_default_memory_arena_cfg();
- fn test_field_tunable_op_enabled() {
+ fn test_field_tunable_op_enable() {
assert_eq!(
unsafe {
let uninit = ::std::mem::MaybeUninit::::uninit();
let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr).tunable_op_enabled) as usize - ptr as usize
+ ::std::ptr::addr_of!((*ptr).tunable_op_enable) as usize - ptr as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(OrtROCMProviderOptions),
"::",
- stringify!(tunable_op_enabled)
+ stringify!(tunable_op_enable)
+ )
+ );
+ }
+ test_field_tunable_op_enable();
+ fn test_field_tunable_op_tuning_enable() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).tunable_op_tuning_enable) as usize - ptr as usize
+ },
+ 52usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtROCMProviderOptions),
+ "::",
+ stringify!(tunable_op_tuning_enable)
)
);
}
- test_field_tunable_op_enabled();
+ test_field_tunable_op_tuning_enable();
}
#[doc = " \\brief TensorRT Provider Options"]
#[doc = ""]
@@ -4304,7 +4361,7 @@ fn bindgen_test_layout_OrtMIGraphXProviderOptions() {
pub struct OrtOpenVINOProviderOptions {
#[doc = " \\brief Device type string"]
#[doc = ""]
- #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""]
+ #[doc = " Valid settings are one of: \"CPU_FP32\", \"CPU_FP16\", \"GPU_FP32\", \"GPU_FP16\""]
pub device_type: *const ::std::os::raw::c_char,
#[doc = "< 0 = disabled, nonzero = enabled"]
pub enable_vpu_fast_compile: ::std::os::raw::c_uchar,
@@ -4483,8 +4540,13 @@ pub struct OrtApiBase {
#[doc = " \\param[in] version Must be ::ORT_API_VERSION"]
#[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"]
#[doc = " older than the version created with this header file."]
+ #[doc = ""]
+ #[doc = " One can call GetVersionString() to get the version of the Onnxruntime library for logging"]
+ #[doc = " and error reporting purposes."]
pub GetApi: ::std::option::Option *const OrtApi>,
- #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = " \\brief Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
pub GetVersionString:
::std::option::Option *const ::std::os::raw::c_char>,
}
@@ -5877,6 +5939,22 @@ pub struct OrtApi {
) -> OrtStatusPtr,
>,
pub ReleaseKernelInfo: ::std::option::Option,
+ #[doc = " \\name Ort Training"]
+ #[doc = " @{"]
+ #[doc = "** \\brief Gets the Training C Api struct"]
+ #[doc = "*"]
+ #[doc = "* Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable"]
+ #[doc = "* training with onnxruntime."]
+ #[doc = "* \\note A NULL pointer will be returned and no error message will be printed if the training api"]
+ #[doc = "* is not supported with this build. A NULL pointer will be returned and an error message will be"]
+ #[doc = "* printed if the provided version is unsupported, for example when using a runtime older than the"]
+ #[doc = "* version created with this header file."]
+ #[doc = "*"]
+ #[doc = "* \\param[in] version Must be ::ORT_API_VERSION"]
+ #[doc = "* \\return The ::OrtTrainingApi struct for the version requested."]
+ #[doc = "*"]
+ #[doc = "* \\since Version 1.13"]
+ #[doc = "*/"]
pub GetTrainingApi:
::std::option::Option *const OrtTrainingApi>,
pub SessionOptionsAppendExecutionProvider_CANN: ::std::option::Option<
@@ -5996,12 +6074,115 @@ pub struct OrtApi {
size: *mut usize,
) -> OrtStatusPtr,
>,
+ pub SessionOptionsAppendExecutionProvider_Dnnl: ::std::option::Option<
+ unsafe extern "C" fn(
+ options: *mut OrtSessionOptions,
+ dnnl_options: *const OrtDnnlProviderOptions,
+ ) -> OrtStatusPtr,
+ >,
+ pub CreateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(out: *mut *mut OrtDnnlProviderOptions) -> OrtStatusPtr,
+ >,
+ pub UpdateDnnlProviderOptions: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *mut OrtDnnlProviderOptions,
+ provider_options_keys: *const *const ::std::os::raw::c_char,
+ provider_options_values: *const *const ::std::os::raw::c_char,
+ num_keys: usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetDnnlProviderOptionsAsString: ::std::option::Option<
+ unsafe extern "C" fn(
+ dnnl_options: *const OrtDnnlProviderOptions,
+ allocator: *mut OrtAllocator,
+ ptr: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Release an ::OrtDnnlProviderOptions"]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub ReleaseDnnlProviderOptions:
+ ::std::option::Option,
+ pub KernelInfo_GetNodeName: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ out: *mut ::std::os::raw::c_char,
+ size: *mut usize,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelInfo_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetLogger: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ logger: *mut *const OrtLogger,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_LogMessage: ::std::option::Option<
+ unsafe extern "C" fn(
+ logger: *const OrtLogger,
+ log_severity_level: OrtLoggingLevel,
+ message: *const ::std::os::raw::c_char,
+ file_path: *const wchar_t,
+ line_number: ::std::os::raw::c_int,
+ func_name: *const ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub Logger_GetLoggingSeverityLevel: ::std::option::Option<
+ unsafe extern "C" fn(logger: *const OrtLogger, out: *mut OrtLoggingLevel) -> OrtStatusPtr,
+ >,
+ pub KernelInfoGetConstantInput_tensor: ::std::option::Option<
+ unsafe extern "C" fn(
+ info: *const OrtKernelInfo,
+ index: usize,
+ is_constant: *mut ::std::os::raw::c_int,
+ out: *mut *const OrtValue,
+ ) -> OrtStatusPtr,
+ >,
+ pub CastTypeInfoToOptionalTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ type_info: *const OrtTypeInfo,
+ out: *mut *const OrtOptionalTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetOptionalContainedTypeInfo: ::std::option::Option<
+ unsafe extern "C" fn(
+ optional_type_info: *const OrtOptionalTypeInfo,
+ out: *mut *mut OrtTypeInfo,
+ ) -> OrtStatusPtr,
+ >,
+ pub GetResizedStringTensorElementBuffer: ::std::option::Option<
+ unsafe extern "C" fn(
+ value: *mut OrtValue,
+ index: usize,
+ length_in_bytes: usize,
+ buffer: *mut *mut ::std::os::raw::c_char,
+ ) -> OrtStatusPtr,
+ >,
+ pub KernelContext_GetAllocator: ::std::option::Option<
+ unsafe extern "C" fn(
+ context: *const OrtKernelContext,
+ mem_info: *const OrtMemoryInfo,
+ out: *mut *mut OrtAllocator,
+ ) -> OrtStatusPtr,
+ >,
+ #[doc = " \\brief Returns a null terminated string of the build info including git info and cxx flags"]
+ #[doc = ""]
+ #[doc = " \\return UTF-8 encoded version string. Do not deallocate the returned buffer."]
+ #[doc = ""]
+ #[doc = " \\since Version 1.15."]
+ pub GetBuildInfoString:
+ ::std::option::Option *const ::std::os::raw::c_char>,
}
#[test]
fn bindgen_test_layout_OrtApi() {
assert_eq!(
::std::mem::size_of::(),
- 1912usize,
+ 2040usize,
concat!("Size of: ", stringify!(OrtApi))
);
assert_eq!(
@@ -10108,6 +10289,281 @@ fn bindgen_test_layout_OrtApi() {
);
}
test_field_GetSessionConfigEntry();
+ fn test_field_SessionOptionsAppendExecutionProvider_Dnnl() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_Dnnl) as usize
+ - ptr as usize
+ },
+ 1912usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(SessionOptionsAppendExecutionProvider_Dnnl)
+ )
+ );
+ }
+ test_field_SessionOptionsAppendExecutionProvider_Dnnl();
+ fn test_field_CreateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CreateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1920usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CreateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_CreateDnnlProviderOptions();
+ fn test_field_UpdateDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).UpdateDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1928usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(UpdateDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_UpdateDnnlProviderOptions();
+ fn test_field_GetDnnlProviderOptionsAsString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetDnnlProviderOptionsAsString) as usize - ptr as usize
+ },
+ 1936usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetDnnlProviderOptionsAsString)
+ )
+ );
+ }
+ test_field_GetDnnlProviderOptionsAsString();
+ fn test_field_ReleaseDnnlProviderOptions() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).ReleaseDnnlProviderOptions) as usize - ptr as usize
+ },
+ 1944usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(ReleaseDnnlProviderOptions)
+ )
+ );
+ }
+ test_field_ReleaseDnnlProviderOptions();
+ fn test_field_KernelInfo_GetNodeName() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetNodeName) as usize - ptr as usize
+ },
+ 1952usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetNodeName)
+ )
+ );
+ }
+ test_field_KernelInfo_GetNodeName();
+ fn test_field_KernelInfo_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfo_GetLogger) as usize - ptr as usize
+ },
+ 1960usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfo_GetLogger)
+ )
+ );
+ }
+ test_field_KernelInfo_GetLogger();
+ fn test_field_KernelContext_GetLogger() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetLogger) as usize - ptr as usize
+ },
+ 1968usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetLogger)
+ )
+ );
+ }
+ test_field_KernelContext_GetLogger();
+ fn test_field_Logger_LogMessage() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_LogMessage) as usize - ptr as usize
+ },
+ 1976usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_LogMessage)
+ )
+ );
+ }
+ test_field_Logger_LogMessage();
+ fn test_field_Logger_GetLoggingSeverityLevel() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).Logger_GetLoggingSeverityLevel) as usize - ptr as usize
+ },
+ 1984usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(Logger_GetLoggingSeverityLevel)
+ )
+ );
+ }
+ test_field_Logger_GetLoggingSeverityLevel();
+ fn test_field_KernelInfoGetConstantInput_tensor() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelInfoGetConstantInput_tensor) as usize
+ - ptr as usize
+ },
+ 1992usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelInfoGetConstantInput_tensor)
+ )
+ );
+ }
+ test_field_KernelInfoGetConstantInput_tensor();
+ fn test_field_CastTypeInfoToOptionalTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).CastTypeInfoToOptionalTypeInfo) as usize - ptr as usize
+ },
+ 2000usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(CastTypeInfoToOptionalTypeInfo)
+ )
+ );
+ }
+ test_field_CastTypeInfoToOptionalTypeInfo();
+ fn test_field_GetOptionalContainedTypeInfo() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetOptionalContainedTypeInfo) as usize - ptr as usize
+ },
+ 2008usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetOptionalContainedTypeInfo)
+ )
+ );
+ }
+ test_field_GetOptionalContainedTypeInfo();
+ fn test_field_GetResizedStringTensorElementBuffer() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetResizedStringTensorElementBuffer) as usize
+ - ptr as usize
+ },
+ 2016usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetResizedStringTensorElementBuffer)
+ )
+ );
+ }
+ test_field_GetResizedStringTensorElementBuffer();
+ fn test_field_KernelContext_GetAllocator() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).KernelContext_GetAllocator) as usize - ptr as usize
+ },
+ 2024usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(KernelContext_GetAllocator)
+ )
+ );
+ }
+ test_field_KernelContext_GetAllocator();
+ fn test_field_GetBuildInfoString() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr).GetBuildInfoString) as usize - ptr as usize
+ },
+ 2032usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(OrtApi),
+ "::",
+ stringify!(GetBuildInfoString)
+ )
+ );
+ }
+ test_field_GetBuildInfoString();
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -10493,6 +10949,12 @@ extern "C" {
device_id: ::std::os::raw::c_int,
) -> OrtStatusPtr;
}
+extern "C" {
+ pub fn OrtSessionOptionsAppendExecutionProvider_Dnnl(
+ options: *mut OrtSessionOptions,
+ use_arena: ::std::os::raw::c_int,
+ ) -> OrtStatusPtr;
+}
extern "C" {
pub fn OrtSessionOptionsAppendExecutionProvider_DML(
options: *mut OrtSessionOptions,