Skip to content

Commit 6572b6f

Browse files
committed
Update Linux (x86_64) bindings to ONNX Runtime v1.7.0
1 parent 98c7071 commit 6572b6f

File tree

1 file changed

+173
-27
lines changed

1 file changed

+173
-27
lines changed

onnxruntime-sys/src/generated/linux/x86_64/bindings.rs

Lines changed: 173 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ pub const _STDC_PREDEF_H: u32 = 1;
2323
pub const __STDC_IEC_559__: u32 = 1;
2424
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
2525
pub const __STDC_ISO_10646__: u32 = 201706;
26-
pub const __STDC_NO_THREADS__: u32 = 1;
2726
pub const __GNU_LIBRARY__: u32 = 6;
2827
pub const __GLIBC__: u32 = 2;
29-
pub const __GLIBC_MINOR__: u32 = 27;
28+
pub const __GLIBC_MINOR__: u32 = 28;
3029
pub const _SYS_CDEFS_H: u32 = 1;
3130
pub const __glibc_c99_flexarr_available: u32 = 1;
3231
pub const __WORDSIZE: u32 = 64;
@@ -102,8 +101,6 @@ pub const __sigset_t_defined: u32 = 1;
102101
pub const __timeval_defined: u32 = 1;
103102
pub const _STRUCT_TIMESPEC: u32 = 1;
104103
pub const FD_SETSIZE: u32 = 1024;
105-
pub const _SYS_SYSMACROS_H: u32 = 1;
106-
pub const _BITS_SYSMACROS_H: u32 = 1;
107104
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
108105
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
109106
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
@@ -167,7 +164,7 @@ pub const _STRING_H: u32 = 1;
167164
pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
168165
pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
169166
pub const _STRINGS_H: u32 = 1;
170-
pub const ORT_API_VERSION: u32 = 6;
167+
pub const ORT_API_VERSION: u32 = 7;
171168
pub type wchar_t = ::std::os::raw::c_int;
172169
#[repr(u32)]
173170
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
@@ -390,6 +387,14 @@ pub type __int32_t = ::std::os::raw::c_int;
390387
pub type __uint32_t = ::std::os::raw::c_uint;
391388
pub type __int64_t = ::std::os::raw::c_long;
392389
pub type __uint64_t = ::std::os::raw::c_ulong;
390+
pub type __int_least8_t = __int8_t;
391+
pub type __uint_least8_t = __uint8_t;
392+
pub type __int_least16_t = __int16_t;
393+
pub type __uint_least16_t = __uint16_t;
394+
pub type __int_least32_t = __int32_t;
395+
pub type __uint_least32_t = __uint32_t;
396+
pub type __int_least64_t = __int64_t;
397+
pub type __uint_least64_t = __uint64_t;
393398
pub type __quad_t = ::std::os::raw::c_long;
394399
pub type __u_quad_t = ::std::os::raw::c_ulong;
395400
pub type __intmax_t = ::std::os::raw::c_long;
@@ -648,18 +653,6 @@ extern "C" {
648653
__sigmask: *const __sigset_t,
649654
) -> ::std::os::raw::c_int;
650655
}
651-
extern "C" {
652-
pub fn gnu_dev_major(__dev: __dev_t) -> ::std::os::raw::c_uint;
653-
}
654-
extern "C" {
655-
pub fn gnu_dev_minor(__dev: __dev_t) -> ::std::os::raw::c_uint;
656-
}
657-
extern "C" {
658-
pub fn gnu_dev_makedev(
659-
__major: ::std::os::raw::c_uint,
660-
__minor: ::std::os::raw::c_uint,
661-
) -> __dev_t;
662-
}
663656
pub type blksize_t = __blksize_t;
664657
pub type blkcnt_t = __blkcnt_t;
665658
pub type fsblkcnt_t = __fsblkcnt_t;
@@ -2201,14 +2194,14 @@ extern "C" {
22012194
pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
22022195
-> ::std::os::raw::c_int;
22032196
}
2204-
pub type int_least8_t = ::std::os::raw::c_schar;
2205-
pub type int_least16_t = ::std::os::raw::c_short;
2206-
pub type int_least32_t = ::std::os::raw::c_int;
2207-
pub type int_least64_t = ::std::os::raw::c_long;
2208-
pub type uint_least8_t = ::std::os::raw::c_uchar;
2209-
pub type uint_least16_t = ::std::os::raw::c_ushort;
2210-
pub type uint_least32_t = ::std::os::raw::c_uint;
2211-
pub type uint_least64_t = ::std::os::raw::c_ulong;
2197+
pub type int_least8_t = __int_least8_t;
2198+
pub type int_least16_t = __int_least16_t;
2199+
pub type int_least32_t = __int_least32_t;
2200+
pub type int_least64_t = __int_least64_t;
2201+
pub type uint_least8_t = __uint_least8_t;
2202+
pub type uint_least16_t = __uint_least16_t;
2203+
pub type uint_least32_t = __uint_least32_t;
2204+
pub type uint_least64_t = __uint_least64_t;
22122205
pub type int_fast8_t = ::std::os::raw::c_schar;
22132206
pub type int_fast16_t = ::std::os::raw::c_long;
22142207
pub type int_fast32_t = ::std::os::raw::c_long;
@@ -2886,12 +2879,14 @@ pub struct OrtCUDAProviderOptions {
28862879
pub cuda_mem_limit: usize,
28872880
pub arena_extend_strategy: ::std::os::raw::c_int,
28882881
pub do_copy_in_default_stream: ::std::os::raw::c_int,
2882+
pub has_user_compute_stream: ::std::os::raw::c_int,
2883+
pub user_compute_stream: *mut ::std::os::raw::c_void,
28892884
}
28902885
#[test]
28912886
fn bindgen_test_layout_OrtCUDAProviderOptions() {
28922887
assert_eq!(
28932888
::std::mem::size_of::<OrtCUDAProviderOptions>(),
2894-
24usize,
2889+
40usize,
28952890
concat!("Size of: ", stringify!(OrtCUDAProviderOptions))
28962891
);
28972892
assert_eq!(
@@ -2962,6 +2957,93 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
29622957
stringify!(do_copy_in_default_stream)
29632958
)
29642959
);
2960+
assert_eq!(
2961+
unsafe {
2962+
&(*(::std::ptr::null::<OrtCUDAProviderOptions>())).has_user_compute_stream as *const _
2963+
as usize
2964+
},
2965+
24usize,
2966+
concat!(
2967+
"Offset of field: ",
2968+
stringify!(OrtCUDAProviderOptions),
2969+
"::",
2970+
stringify!(has_user_compute_stream)
2971+
)
2972+
);
2973+
assert_eq!(
2974+
unsafe {
2975+
&(*(::std::ptr::null::<OrtCUDAProviderOptions>())).user_compute_stream as *const _
2976+
as usize
2977+
},
2978+
32usize,
2979+
concat!(
2980+
"Offset of field: ",
2981+
stringify!(OrtCUDAProviderOptions),
2982+
"::",
2983+
stringify!(user_compute_stream)
2984+
)
2985+
);
2986+
}
2987+
#[doc = " <summary>"]
2988+
#[doc = " Options for the TensorRT provider that are passed to SessionOptionsAppendExecutionProvider_TensorRT"]
2989+
#[doc = " </summary>"]
2990+
#[repr(C)]
2991+
#[derive(Debug, Copy, Clone)]
2992+
pub struct OrtTensorRTProviderOptions {
2993+
pub device_id: ::std::os::raw::c_int,
2994+
pub has_user_compute_stream: ::std::os::raw::c_int,
2995+
pub user_compute_stream: *mut ::std::os::raw::c_void,
2996+
}
2997+
#[test]
2998+
fn bindgen_test_layout_OrtTensorRTProviderOptions() {
2999+
assert_eq!(
3000+
::std::mem::size_of::<OrtTensorRTProviderOptions>(),
3001+
16usize,
3002+
concat!("Size of: ", stringify!(OrtTensorRTProviderOptions))
3003+
);
3004+
assert_eq!(
3005+
::std::mem::align_of::<OrtTensorRTProviderOptions>(),
3006+
8usize,
3007+
concat!("Alignment of ", stringify!(OrtTensorRTProviderOptions))
3008+
);
3009+
assert_eq!(
3010+
unsafe {
3011+
&(*(::std::ptr::null::<OrtTensorRTProviderOptions>())).device_id as *const _ as usize
3012+
},
3013+
0usize,
3014+
concat!(
3015+
"Offset of field: ",
3016+
stringify!(OrtTensorRTProviderOptions),
3017+
"::",
3018+
stringify!(device_id)
3019+
)
3020+
);
3021+
assert_eq!(
3022+
unsafe {
3023+
&(*(::std::ptr::null::<OrtTensorRTProviderOptions>())).has_user_compute_stream
3024+
as *const _ as usize
3025+
},
3026+
4usize,
3027+
concat!(
3028+
"Offset of field: ",
3029+
stringify!(OrtTensorRTProviderOptions),
3030+
"::",
3031+
stringify!(has_user_compute_stream)
3032+
)
3033+
);
3034+
assert_eq!(
3035+
unsafe {
3036+
&(*(::std::ptr::null::<OrtTensorRTProviderOptions>())).user_compute_stream as *const _
3037+
as usize
3038+
},
3039+
8usize,
3040+
concat!(
3041+
"Offset of field: ",
3042+
stringify!(OrtTensorRTProviderOptions),
3043+
"::",
3044+
stringify!(user_compute_stream)
3045+
)
3046+
);
29653047
}
29663048
#[doc = " <summary>"]
29673049
#[doc = " Options for the OpenVINO provider that are passed to SessionOptionsAppendExecutionProvider_OpenVINO"]
@@ -3939,12 +4021,31 @@ pub struct OrtApi {
39394021
) -> OrtStatusPtr,
39404022
>,
39414023
pub ReleaseArenaCfg: ::std::option::Option<unsafe extern "C" fn(input: *mut OrtArenaCfg)>,
4024+
pub ModelMetadataGetGraphDescription: ::std::option::Option<
4025+
unsafe extern "C" fn(
4026+
model_metadata: *const OrtModelMetadata,
4027+
allocator: *mut OrtAllocator,
4028+
value: *mut *mut ::std::os::raw::c_char,
4029+
) -> OrtStatusPtr,
4030+
>,
4031+
pub SessionOptionsAppendExecutionProvider_TensorRT: ::std::option::Option<
4032+
unsafe extern "C" fn(
4033+
options: *mut OrtSessionOptions,
4034+
tensorrt_options: *const OrtTensorRTProviderOptions,
4035+
) -> OrtStatusPtr,
4036+
>,
4037+
pub SetCurrentGpuDeviceId: ::std::option::Option<
4038+
unsafe extern "C" fn(device_id: ::std::os::raw::c_int) -> OrtStatusPtr,
4039+
>,
4040+
pub GetCurrentGpuDeviceId: ::std::option::Option<
4041+
unsafe extern "C" fn(device_id: *mut ::std::os::raw::c_int) -> OrtStatusPtr,
4042+
>,
39424043
}
39434044
#[test]
39444045
fn bindgen_test_layout_OrtApi() {
39454046
assert_eq!(
39464047
::std::mem::size_of::<OrtApi>(),
3947-
1256usize,
4048+
1288usize,
39484049
concat!("Size of: ", stringify!(OrtApi))
39494050
);
39504051
assert_eq!(
@@ -5616,6 +5717,51 @@ fn bindgen_test_layout_OrtApi() {
56165717
stringify!(ReleaseArenaCfg)
56175718
)
56185719
);
5720+
assert_eq!(
5721+
unsafe {
5722+
&(*(::std::ptr::null::<OrtApi>())).ModelMetadataGetGraphDescription as *const _ as usize
5723+
},
5724+
1256usize,
5725+
concat!(
5726+
"Offset of field: ",
5727+
stringify!(OrtApi),
5728+
"::",
5729+
stringify!(ModelMetadataGetGraphDescription)
5730+
)
5731+
);
5732+
assert_eq!(
5733+
unsafe {
5734+
&(*(::std::ptr::null::<OrtApi>())).SessionOptionsAppendExecutionProvider_TensorRT
5735+
as *const _ as usize
5736+
},
5737+
1264usize,
5738+
concat!(
5739+
"Offset of field: ",
5740+
stringify!(OrtApi),
5741+
"::",
5742+
stringify!(SessionOptionsAppendExecutionProvider_TensorRT)
5743+
)
5744+
);
5745+
assert_eq!(
5746+
unsafe { &(*(::std::ptr::null::<OrtApi>())).SetCurrentGpuDeviceId as *const _ as usize },
5747+
1272usize,
5748+
concat!(
5749+
"Offset of field: ",
5750+
stringify!(OrtApi),
5751+
"::",
5752+
stringify!(SetCurrentGpuDeviceId)
5753+
)
5754+
);
5755+
assert_eq!(
5756+
unsafe { &(*(::std::ptr::null::<OrtApi>())).GetCurrentGpuDeviceId as *const _ as usize },
5757+
1280usize,
5758+
concat!(
5759+
"Offset of field: ",
5760+
stringify!(OrtApi),
5761+
"::",
5762+
stringify!(GetCurrentGpuDeviceId)
5763+
)
5764+
);
56195765
}
56205766
#[repr(C)]
56215767
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)