From 9769ca383dc7ef75d90a0fb2a2c885a064c9ef40 Mon Sep 17 00:00:00 2001 From: Deokhwan Kim Date: Fri, 20 May 2022 11:54:06 +0900 Subject: [PATCH] feat: update all bindings to ONNX Runtime v1.11.0 --- build.rs | 4 +- src/generated/linux/x86_64/bindings.rs | 187 ++++++++++++++++++++++- src/generated/macos/x86_64/bindings.rs | 187 ++++++++++++++++++++++- src/generated/windows/x86_64/bindings.rs | 187 ++++++++++++++++++++++- 4 files changed, 557 insertions(+), 8 deletions(-) diff --git a/build.rs b/build.rs index 9572e57d..aa9d77f6 100644 --- a/build.rs +++ b/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 --features generate-bindings -const ORT_VERSION: &str = "1.10.0"; +const ORT_VERSION: &str = "1.11.0"; /// Base Url from which to download pre-built releases/ const ORT_RELEASE_BASE_URL: &str = "https://github.com/microsoft/onnxruntime/releases/download"; @@ -301,7 +301,7 @@ impl OnnxPrebuiltArchive for Triplet { | (Os::MacOs, Architecture::Arm64, Accelerator::None) => { Cow::from(format!("{}-{}", self.os.as_onnx_str(), self.arch.as_onnx_str())) } - // onnxruntime-linux-aarch64-1.0.0.tgz + // onnxruntime-linux-aarch64-1.10.0.tgz (Os::Linux, Architecture::Arm64, Accelerator::None) => { Cow::from(format!("{}-{}", self.os.as_onnx_str(), "aarch64")) } diff --git a/src/generated/linux/x86_64/bindings.rs b/src/generated/linux/x86_64/bindings.rs index 148c9a6a..1d012f8f 100644 --- a/src/generated/linux/x86_64/bindings.rs +++ b/src/generated/linux/x86_64/bindings.rs @@ -171,7 +171,7 @@ pub const _STRING_H: u32 = 1; pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; pub const _STRINGS_H: u32 = 1; -pub const ORT_API_VERSION: u32 = 10; +pub const ORT_API_VERSION: u32 = 11; pub type wchar_t = ::std::os::raw::c_int; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -2439,6 +2439,11 @@ pub struct OrtPrepackedWeightsContainer { pub struct OrtTensorRTProviderOptionsV2 { _unused: [u8; 0], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCUDAProviderOptionsV2 { + _unused: [u8; 0], +} pub type OrtStatusPtr = *mut OrtStatus; #[doc = " \\brief Memory allocation interface"] #[doc = ""] @@ -3154,6 +3159,67 @@ fn bindgen_test_layout_OrtTensorRTProviderOptions() { ) ); } +#[doc = " \\brief MIGraphX Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMIGraphXProviderOptions { + pub device_id: ::std::os::raw::c_int, + pub migraphx_fp16_enable: ::std::os::raw::c_int, + pub migraphx_int8_enable: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_OrtMIGraphXProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).device_id as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(device_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_fp16_enable as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_fp16_enable) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_int8_enable as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_int8_enable) + ) + ); +} #[doc = " \\brief OpenVINO Provider Options"] #[doc = ""] #[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO"] @@ -4550,12 +4616,49 @@ pub struct OrtApi { ::std::option::Option OrtStatusPtr>, pub SynchronizeBoundOutputs: ::std::option::Option OrtStatusPtr>, + pub SessionOptionsAppendExecutionProvider_CUDA_V2: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + cuda_options: *const OrtCUDAProviderOptionsV2, + ) -> OrtStatusPtr, + >, + pub CreateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtCUDAProviderOptionsV2) -> OrtStatusPtr, + >, + pub UpdateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *mut OrtCUDAProviderOptionsV2, + 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 GetCUDAProviderOptionsAsString: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *const OrtCUDAProviderOptionsV2, + allocator: *mut OrtAllocator, + ptr: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Release an ::OrtCUDAProviderOptionsV2"] + #[doc = ""] + #[doc = " \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"] + #[doc = ""] + #[doc = " \\since Version 1.11."] + pub ReleaseCUDAProviderOptions: + ::std::option::Option, + pub SessionOptionsAppendExecutionProvider_MIGraphX: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + migraphx_options: *const OrtMIGraphXProviderOptions, + ) -> OrtStatusPtr, + >, } #[test] fn bindgen_test_layout_OrtApi() { assert_eq!( ::std::mem::size_of::(), - 1632usize, + 1680usize, concat!("Size of: ", stringify!(OrtApi)) ); assert_eq!( @@ -6114,6 +6217,80 @@ fn bindgen_test_layout_OrtApi() { 1624usize, concat!("Offset of field: ", stringify!(OrtApi), "::", stringify!(SynchronizeBoundOutputs)) ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_CUDA_V2 + as *const _ as usize + }, + 1632usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_CUDA_V2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).CreateCUDAProviderOptions as *const _ as usize + }, + 1640usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).UpdateCUDAProviderOptions as *const _ as usize + }, + 1648usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UpdateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).GetCUDAProviderOptionsAsString as *const _ as usize + }, + 1656usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetCUDAProviderOptionsAsString) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ReleaseCUDAProviderOptions as *const _ as usize + }, + 1664usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_MIGraphX + as *const _ as usize + }, + 1672usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_MIGraphX) + ) + ); } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -6269,6 +6446,12 @@ extern "C" { device_id: ::std::os::raw::c_int, ) -> OrtStatusPtr; } +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_MIGraphX( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __locale_data { diff --git a/src/generated/macos/x86_64/bindings.rs b/src/generated/macos/x86_64/bindings.rs index db15f977..6b6f7b6b 100644 --- a/src/generated/macos/x86_64/bindings.rs +++ b/src/generated/macos/x86_64/bindings.rs @@ -569,7 +569,7 @@ pub const EXIT_SUCCESS: u32 = 0; pub const RAND_MAX: u32 = 2147483647; pub const _USE_FORTIFY_LEVEL: u32 = 2; pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; -pub const ORT_API_VERSION: u32 = 10; +pub const ORT_API_VERSION: u32 = 11; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; @@ -11574,6 +11574,11 @@ pub struct OrtPrepackedWeightsContainer { pub struct OrtTensorRTProviderOptionsV2 { _unused: [u8; 0], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCUDAProviderOptionsV2 { + _unused: [u8; 0], +} pub type OrtStatusPtr = *mut OrtStatus; #[doc = " \\brief Memory allocation interface"] #[doc = ""] @@ -12289,6 +12294,67 @@ fn bindgen_test_layout_OrtTensorRTProviderOptions() { ) ); } +#[doc = " \\brief MIGraphX Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMIGraphXProviderOptions { + pub device_id: ::std::os::raw::c_int, + pub migraphx_fp16_enable: ::std::os::raw::c_int, + pub migraphx_int8_enable: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_OrtMIGraphXProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).device_id as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(device_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_fp16_enable as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_fp16_enable) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_int8_enable as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_int8_enable) + ) + ); +} #[doc = " \\brief OpenVINO Provider Options"] #[doc = ""] #[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO"] @@ -13685,12 +13751,49 @@ pub struct OrtApi { ::std::option::Option OrtStatusPtr>, pub SynchronizeBoundOutputs: ::std::option::Option OrtStatusPtr>, + pub SessionOptionsAppendExecutionProvider_CUDA_V2: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + cuda_options: *const OrtCUDAProviderOptionsV2, + ) -> OrtStatusPtr, + >, + pub CreateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtCUDAProviderOptionsV2) -> OrtStatusPtr, + >, + pub UpdateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *mut OrtCUDAProviderOptionsV2, + 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 GetCUDAProviderOptionsAsString: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *const OrtCUDAProviderOptionsV2, + allocator: *mut OrtAllocator, + ptr: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Release an ::OrtCUDAProviderOptionsV2"] + #[doc = ""] + #[doc = " \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"] + #[doc = ""] + #[doc = " \\since Version 1.11."] + pub ReleaseCUDAProviderOptions: + ::std::option::Option, + pub SessionOptionsAppendExecutionProvider_MIGraphX: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + migraphx_options: *const OrtMIGraphXProviderOptions, + ) -> OrtStatusPtr, + >, } #[test] fn bindgen_test_layout_OrtApi() { assert_eq!( ::std::mem::size_of::(), - 1632usize, + 1680usize, concat!("Size of: ", stringify!(OrtApi)) ); assert_eq!( @@ -15249,6 +15352,80 @@ fn bindgen_test_layout_OrtApi() { 1624usize, concat!("Offset of field: ", stringify!(OrtApi), "::", stringify!(SynchronizeBoundOutputs)) ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_CUDA_V2 + as *const _ as usize + }, + 1632usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_CUDA_V2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).CreateCUDAProviderOptions as *const _ as usize + }, + 1640usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).UpdateCUDAProviderOptions as *const _ as usize + }, + 1648usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UpdateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).GetCUDAProviderOptionsAsString as *const _ as usize + }, + 1656usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetCUDAProviderOptionsAsString) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ReleaseCUDAProviderOptions as *const _ as usize + }, + 1664usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_MIGraphX + as *const _ as usize + }, + 1672usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_MIGraphX) + ) + ); } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -15404,6 +15581,12 @@ extern "C" { device_id: ::std::os::raw::c_int, ) -> OrtStatusPtr; } +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_MIGraphX( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/src/generated/windows/x86_64/bindings.rs b/src/generated/windows/x86_64/bindings.rs index a49442e6..9de796ac 100644 --- a/src/generated/windows/x86_64/bindings.rs +++ b/src/generated/windows/x86_64/bindings.rs @@ -166,7 +166,7 @@ pub const ETIMEDOUT: u32 = 138; pub const ETXTBSY: u32 = 139; pub const EWOULDBLOCK: u32 = 140; pub const _NLSCMPERROR: u32 = 2147483647; -pub const ORT_API_VERSION: u32 = 10; +pub const ORT_API_VERSION: u32 = 11; pub const __SAL_H_FULL_VER: u32 = 140050727; pub const __SPECSTRINGS_STRICT_LEVEL: u32 = 1; pub const __drv_typeConst: u32 = 0; @@ -2854,6 +2854,11 @@ pub struct OrtPrepackedWeightsContainer { pub struct OrtTensorRTProviderOptionsV2 { _unused: [u8; 0], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCUDAProviderOptionsV2 { + _unused: [u8; 0], +} pub type OrtStatusPtr = *mut OrtStatus; #[doc = " \\brief Memory allocation interface"] #[doc = ""] @@ -3569,6 +3574,67 @@ fn bindgen_test_layout_OrtTensorRTProviderOptions() { ) ); } +#[doc = " \\brief MIGraphX Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMIGraphXProviderOptions { + pub device_id: ::std::os::raw::c_int, + pub migraphx_fp16_enable: ::std::os::raw::c_int, + pub migraphx_int8_enable: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_OrtMIGraphXProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).device_id as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(device_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_fp16_enable as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_fp16_enable) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).migraphx_int8_enable as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_int8_enable) + ) + ); +} #[doc = " \\brief OpenVINO Provider Options"] #[doc = ""] #[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO"] @@ -4965,12 +5031,49 @@ pub struct OrtApi { ::std::option::Option OrtStatusPtr>, pub SynchronizeBoundOutputs: ::std::option::Option OrtStatusPtr>, + pub SessionOptionsAppendExecutionProvider_CUDA_V2: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + cuda_options: *const OrtCUDAProviderOptionsV2, + ) -> OrtStatusPtr, + >, + pub CreateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtCUDAProviderOptionsV2) -> OrtStatusPtr, + >, + pub UpdateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *mut OrtCUDAProviderOptionsV2, + 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 GetCUDAProviderOptionsAsString: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *const OrtCUDAProviderOptionsV2, + allocator: *mut OrtAllocator, + ptr: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Release an ::OrtCUDAProviderOptionsV2"] + #[doc = ""] + #[doc = " \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"] + #[doc = ""] + #[doc = " \\since Version 1.11."] + pub ReleaseCUDAProviderOptions: + ::std::option::Option, + pub SessionOptionsAppendExecutionProvider_MIGraphX: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + migraphx_options: *const OrtMIGraphXProviderOptions, + ) -> OrtStatusPtr, + >, } #[test] fn bindgen_test_layout_OrtApi() { assert_eq!( ::std::mem::size_of::(), - 1632usize, + 1680usize, concat!("Size of: ", stringify!(OrtApi)) ); assert_eq!( @@ -6529,6 +6632,80 @@ fn bindgen_test_layout_OrtApi() { 1624usize, concat!("Offset of field: ", stringify!(OrtApi), "::", stringify!(SynchronizeBoundOutputs)) ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_CUDA_V2 + as *const _ as usize + }, + 1632usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_CUDA_V2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).CreateCUDAProviderOptions as *const _ as usize + }, + 1640usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).UpdateCUDAProviderOptions as *const _ as usize + }, + 1648usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UpdateCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).GetCUDAProviderOptionsAsString as *const _ as usize + }, + 1656usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetCUDAProviderOptionsAsString) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ReleaseCUDAProviderOptions as *const _ as usize + }, + 1664usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseCUDAProviderOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SessionOptionsAppendExecutionProvider_MIGraphX + as *const _ as usize + }, + 1672usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_MIGraphX) + ) + ); } #[repr(i32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -6684,6 +6861,12 @@ extern "C" { device_id: ::std::os::raw::c_int, ) -> OrtStatusPtr; } +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_MIGraphX( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __crt_locale_data {