@@ -165,7 +165,7 @@ pub const ETIMEDOUT: u32 = 138;
165165pub const ETXTBSY : u32 = 139 ;
166166pub const EWOULDBLOCK : u32 = 140 ;
167167pub const _NLSCMPERROR: u32 = 2147483647 ;
168- pub const ORT_API_VERSION : u32 = 6 ;
168+ pub const ORT_API_VERSION : u32 = 7 ;
169169pub const __SAL_H_FULL_VER: u32 = 140050727 ;
170170pub const __SPECSTRINGS_STRICT_LEVEL: u32 = 1 ;
171171pub const __drv_typeConst: u32 = 0 ;
@@ -3049,12 +3049,14 @@ pub struct OrtCUDAProviderOptions {
30493049 pub cuda_mem_limit : usize ,
30503050 pub arena_extend_strategy : :: std:: os:: raw:: c_int ,
30513051 pub do_copy_in_default_stream : :: std:: os:: raw:: c_int ,
3052+ pub has_user_compute_stream : :: std:: os:: raw:: c_int ,
3053+ pub user_compute_stream : * mut :: std:: os:: raw:: c_void ,
30523054}
30533055#[ test]
30543056fn bindgen_test_layout_OrtCUDAProviderOptions ( ) {
30553057 assert_eq ! (
30563058 :: std:: mem:: size_of:: <OrtCUDAProviderOptions >( ) ,
3057- 24usize ,
3059+ 40usize ,
30583060 concat!( "Size of: " , stringify!( OrtCUDAProviderOptions ) )
30593061 ) ;
30603062 assert_eq ! (
@@ -3125,6 +3127,93 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
31253127 stringify!( do_copy_in_default_stream)
31263128 )
31273129 ) ;
3130+ assert_eq ! (
3131+ unsafe {
3132+ & ( * ( :: std:: ptr:: null:: <OrtCUDAProviderOptions >( ) ) ) . has_user_compute_stream as * const _
3133+ as usize
3134+ } ,
3135+ 24usize ,
3136+ concat!(
3137+ "Offset of field: " ,
3138+ stringify!( OrtCUDAProviderOptions ) ,
3139+ "::" ,
3140+ stringify!( has_user_compute_stream)
3141+ )
3142+ ) ;
3143+ assert_eq ! (
3144+ unsafe {
3145+ & ( * ( :: std:: ptr:: null:: <OrtCUDAProviderOptions >( ) ) ) . user_compute_stream as * const _
3146+ as usize
3147+ } ,
3148+ 32usize ,
3149+ concat!(
3150+ "Offset of field: " ,
3151+ stringify!( OrtCUDAProviderOptions ) ,
3152+ "::" ,
3153+ stringify!( user_compute_stream)
3154+ )
3155+ ) ;
3156+ }
3157+ #[ doc = " <summary>" ]
3158+ #[ doc = " Options for the TensorRT provider that are passed to SessionOptionsAppendExecutionProvider_TensorRT" ]
3159+ #[ doc = " </summary>" ]
3160+ #[ repr( C ) ]
3161+ #[ derive( Debug , Copy , Clone ) ]
3162+ pub struct OrtTensorRTProviderOptions {
3163+ pub device_id : :: std:: os:: raw:: c_int ,
3164+ pub has_user_compute_stream : :: std:: os:: raw:: c_int ,
3165+ pub user_compute_stream : * mut :: std:: os:: raw:: c_void ,
3166+ }
3167+ #[ test]
3168+ fn bindgen_test_layout_OrtTensorRTProviderOptions ( ) {
3169+ assert_eq ! (
3170+ :: std:: mem:: size_of:: <OrtTensorRTProviderOptions >( ) ,
3171+ 16usize ,
3172+ concat!( "Size of: " , stringify!( OrtTensorRTProviderOptions ) )
3173+ ) ;
3174+ assert_eq ! (
3175+ :: std:: mem:: align_of:: <OrtTensorRTProviderOptions >( ) ,
3176+ 8usize ,
3177+ concat!( "Alignment of " , stringify!( OrtTensorRTProviderOptions ) )
3178+ ) ;
3179+ assert_eq ! (
3180+ unsafe {
3181+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . device_id as * const _ as usize
3182+ } ,
3183+ 0usize ,
3184+ concat!(
3185+ "Offset of field: " ,
3186+ stringify!( OrtTensorRTProviderOptions ) ,
3187+ "::" ,
3188+ stringify!( device_id)
3189+ )
3190+ ) ;
3191+ assert_eq ! (
3192+ unsafe {
3193+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . has_user_compute_stream
3194+ as * const _ as usize
3195+ } ,
3196+ 4usize ,
3197+ concat!(
3198+ "Offset of field: " ,
3199+ stringify!( OrtTensorRTProviderOptions ) ,
3200+ "::" ,
3201+ stringify!( has_user_compute_stream)
3202+ )
3203+ ) ;
3204+ assert_eq ! (
3205+ unsafe {
3206+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . user_compute_stream as * const _
3207+ as usize
3208+ } ,
3209+ 8usize ,
3210+ concat!(
3211+ "Offset of field: " ,
3212+ stringify!( OrtTensorRTProviderOptions ) ,
3213+ "::" ,
3214+ stringify!( user_compute_stream)
3215+ )
3216+ ) ;
31283217}
31293218#[ doc = " <summary>" ]
31303219#[ doc = " Options for the OpenVINO provider that are passed to SessionOptionsAppendExecutionProvider_OpenVINO" ]
@@ -4102,12 +4191,31 @@ pub struct OrtApi {
41024191 ) -> OrtStatusPtr ,
41034192 > ,
41044193 pub ReleaseArenaCfg : :: std:: option:: Option < unsafe extern "C" fn ( input : * mut OrtArenaCfg ) > ,
4194+ pub ModelMetadataGetGraphDescription : :: std:: option:: Option <
4195+ unsafe extern "C" fn (
4196+ model_metadata : * const OrtModelMetadata ,
4197+ allocator : * mut OrtAllocator ,
4198+ value : * mut * mut :: std:: os:: raw:: c_char ,
4199+ ) -> OrtStatusPtr ,
4200+ > ,
4201+ pub SessionOptionsAppendExecutionProvider_TensorRT : :: std:: option:: Option <
4202+ unsafe extern "C" fn (
4203+ options : * mut OrtSessionOptions ,
4204+ tensorrt_options : * const OrtTensorRTProviderOptions ,
4205+ ) -> OrtStatusPtr ,
4206+ > ,
4207+ pub SetCurrentGpuDeviceId : :: std:: option:: Option <
4208+ unsafe extern "C" fn ( device_id : :: std:: os:: raw:: c_int ) -> OrtStatusPtr ,
4209+ > ,
4210+ pub GetCurrentGpuDeviceId : :: std:: option:: Option <
4211+ unsafe extern "C" fn ( device_id : * mut :: std:: os:: raw:: c_int ) -> OrtStatusPtr ,
4212+ > ,
41054213}
41064214#[ test]
41074215fn bindgen_test_layout_OrtApi ( ) {
41084216 assert_eq ! (
41094217 :: std:: mem:: size_of:: <OrtApi >( ) ,
4110- 1256usize ,
4218+ 1288usize ,
41114219 concat!( "Size of: " , stringify!( OrtApi ) )
41124220 ) ;
41134221 assert_eq ! (
@@ -5779,6 +5887,51 @@ fn bindgen_test_layout_OrtApi() {
57795887 stringify!( ReleaseArenaCfg )
57805888 )
57815889 ) ;
5890+ assert_eq ! (
5891+ unsafe {
5892+ & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . ModelMetadataGetGraphDescription as * const _ as usize
5893+ } ,
5894+ 1256usize ,
5895+ concat!(
5896+ "Offset of field: " ,
5897+ stringify!( OrtApi ) ,
5898+ "::" ,
5899+ stringify!( ModelMetadataGetGraphDescription )
5900+ )
5901+ ) ;
5902+ assert_eq ! (
5903+ unsafe {
5904+ & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . SessionOptionsAppendExecutionProvider_TensorRT
5905+ as * const _ as usize
5906+ } ,
5907+ 1264usize ,
5908+ concat!(
5909+ "Offset of field: " ,
5910+ stringify!( OrtApi ) ,
5911+ "::" ,
5912+ stringify!( SessionOptionsAppendExecutionProvider_TensorRT )
5913+ )
5914+ ) ;
5915+ assert_eq ! (
5916+ unsafe { & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . SetCurrentGpuDeviceId as * const _ as usize } ,
5917+ 1272usize ,
5918+ concat!(
5919+ "Offset of field: " ,
5920+ stringify!( OrtApi ) ,
5921+ "::" ,
5922+ stringify!( SetCurrentGpuDeviceId )
5923+ )
5924+ ) ;
5925+ assert_eq ! (
5926+ unsafe { & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . GetCurrentGpuDeviceId as * const _ as usize } ,
5927+ 1280usize ,
5928+ concat!(
5929+ "Offset of field: " ,
5930+ stringify!( OrtApi ) ,
5931+ "::" ,
5932+ stringify!( GetCurrentGpuDeviceId )
5933+ )
5934+ ) ;
57825935}
57835936#[ repr( C ) ]
57845937#[ derive( Debug , Copy , Clone ) ]
0 commit comments