From ba7aa123ad8daf286d3acac937f24d700e3e6c41 Mon Sep 17 00:00:00 2001 From: Deokhwan Kim Date: Thu, 9 Mar 2023 18:19:39 +0900 Subject: [PATCH] release: cut the v0.18.0 release --- CHANGELOG.md | 9 +- Cargo.toml | 4 +- README.md | 6 +- src/lib.rs | 402 +++++++++++++++++++++++++-------------------------- 4 files changed, 214 insertions(+), 207 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26cdfc5..f0e6ae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.18.0] - 2023-03-09 + +### Changed + +- Support ONNX Runtime v1.14.1. + ## [0.17.0] - 2023-03-09 ### Changed @@ -136,7 +142,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support ONNX Runtime v1.5. -[Unreleased]: https://github.com/furiosa-ai/onnxrt/compare/0.17.0...HEAD +[Unreleased]: https://github.com/furiosa-ai/onnxrt/compare/0.18.0...HEAD +[0.18.0]: https://github.com/furiosa-ai/onnxrt/compare/0.17.0...0.18.0 [0.17.0]: https://github.com/furiosa-ai/onnxrt/compare/0.16.1...0.17.0 [0.16.1]: https://github.com/furiosa-ai/onnxrt/compare/0.16.0...0.16.1 [0.16.0]: https://github.com/furiosa-ai/onnxrt/compare/0.15.0...0.16.0 diff --git a/Cargo.toml b/Cargo.toml index 33441bf..228cb62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "onnxrt" -version = "0.17.0" +version = "0.18.0" authors = ["FuriosaAI, Inc."] description = "OnnxRt provides mid-level Rust bindings to the C API for Microsoft's ONNX Runtime." license = "MIT OR Apache-2.0" @@ -8,7 +8,7 @@ readme = "README.md" repository = "https://github.com/furiosa-ai/onnxrt" keywords = ["onnx", "neuralnetworks", "ffi", "bindings"] categories = ["science", "external-ffi-bindings"] -documentation = "https://furiosa-ai.github.io/onnxrt/0.17.0/onnxrt" +documentation = "https://furiosa-ai.github.io/onnxrt/0.18.0/onnxrt" edition = "2021" [dependencies] diff --git a/README.md b/README.md index 1cbbf0e..c1dc660 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # OnnxRt [![build status](https://github.com/furiosa-ai/onnxrt/actions/workflows/build.yml/badge.svg)](https://github.com/furiosa-ai/onnxrt/actions/workflows/build.yml?query=branch%3Amain) -[![docs](https://img.shields.io/badge/docs-0.17.0-blue.svg)](https://furiosa-ai.github.io/onnxrt/0.17.0/onnxrt/) +[![docs](https://img.shields.io/badge/docs-0.18.0-blue.svg)](https://furiosa-ai.github.io/onnxrt/0.18.0/onnxrt/) OnnxRt provides mid-level Rust bindings to [the C API] for Microsoft's [ONNX -Runtime] v1.14.0. +Runtime] v1.14.1. [the C API]: https://www.onnxruntime.ai/docs/reference/api/c-api.html [ONNX Runtime]: https://www.onnxruntime.ai/ @@ -21,7 +21,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -onnxrt = { git = "https://github.com/furiosa-ai/onnxrt", tag = "0.17.0" } +onnxrt = { git = "https://github.com/furiosa-ai/onnxrt", tag = "0.18.0" } ``` ## Example diff --git a/src/lib.rs b/src/lib.rs index 11db5ae..e48c821 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ -//! [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h) +//! [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h) -#![doc(html_root_url = "https://furiosa-ai.github.io/onnxrt/0.17.0/onnxrt")] +#![doc(html_root_url = "https://furiosa-ai.github.io/onnxrt/0.18.0/onnxrt")] #![warn(rust_2018_idioms)] #[cfg(target_family = "unix")] @@ -165,7 +165,7 @@ pub struct Env { } impl Env { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L668-L676) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L668-L676) pub fn new(logging_level: OrtLoggingLevel, log_id: &str) -> self::Result { let mut env = ptr::null_mut::(); let log_id = CString::new(log_id)?; @@ -173,7 +173,7 @@ impl Env { Ok(Self { raw: NonNull::new(env).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2003-L2017) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2003-L2017) pub fn new_with_global_thread_pools( logging_level: OrtLoggingLevel, log_id: &str, @@ -190,7 +190,7 @@ impl Env { Ok(Self { raw: NonNull::new(env).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L678-L690) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L678-L690) pub fn new_with_custom_logger( logging_function: OrtLoggingFunction, logger_param: Option<&'static mut T>, @@ -211,7 +211,7 @@ impl Env { Ok(Self { raw: NonNull::new(env).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2445-L2461) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2445-L2461) pub fn new_with_custom_logger_and_global_thread_pools( logging_function: OrtLoggingFunction, logger_param: Option<&'static mut T>, @@ -234,7 +234,7 @@ impl Env { Ok(Self { raw: NonNull::new(env).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3620-L3627) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3620-L3627) pub fn set_custom_log_level(&mut self, logging_level: OrtLoggingLevel) { panic_on_error!(ORT_API.UpdateEnvWithCustomLogLevel.unwrap()( self.raw.as_ptr(), @@ -242,22 +242,22 @@ impl Env { )); } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L692-L699) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L692-L699) pub fn enable_telemetry_events(&self) { panic_on_error!(ORT_API.EnableTelemetryEvents.unwrap()(self.raw.as_ptr())); } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L700-L707) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L700-L707) pub fn disable_telemetry_events(&self) { panic_on_error!(ORT_API.DisableTelemetryEvents.unwrap()(self.raw.as_ptr())); } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2347-L2358) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2347-L2358) pub fn set_language_projection(&self, projection: OrtLanguageProjection) { panic_on_error!(ORT_API.SetLanguageProjection.unwrap()(self.raw.as_ptr(), projection)); } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2330-L2345) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2330-L2345) pub fn create_and_register_allocator( &mut self, memory_info: &MemoryInfo, @@ -271,7 +271,7 @@ impl Env { Ok(()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2873-L2888) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2873-L2888) pub fn register_allocator(&mut self, allocator: &mut Allocator) -> self::Result<()> { bail_on_error!(ORT_API.RegisterAllocator.unwrap()( self.raw.as_ptr(), @@ -280,7 +280,7 @@ impl Env { Ok(()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2890-L2901) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2890-L2901) pub fn unregister_allocator(&mut self, memory_info: &MemoryInfo) -> self::Result<()> { bail_on_error!(ORT_API.UnregisterAllocator.unwrap()( self.raw.as_ptr(), @@ -291,7 +291,7 @@ impl Env { } impl Drop for Env { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1764) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1764) fn drop(&mut self) { unsafe { ORT_API.ReleaseEnv.unwrap()(self.raw.as_ptr()); @@ -309,14 +309,14 @@ pub struct RunOptions { } impl RunOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1116-L1122) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1116-L1122) pub fn new() -> Self { let mut options = ptr::null_mut::(); panic_on_error!(ORT_API.CreateRunOptions.unwrap()(&mut options)); Self { raw: NonNull::new(options).unwrap() } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1124-L1133) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1124-L1133) pub fn set_log_verbosity_level(&mut self, level: i32) -> &mut Self { panic_on_error!(ORT_API.RunOptionsSetRunLogVerbosityLevel.unwrap()( self.raw.as_ptr(), @@ -325,7 +325,7 @@ impl RunOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1155-L1165) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1155-L1165) pub fn log_verbosity_level(&self) -> i32 { let mut level = 0; panic_on_error!(ORT_API.RunOptionsGetRunLogVerbosityLevel.unwrap()( @@ -335,7 +335,7 @@ impl RunOptions { level } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1135-L1142) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1135-L1142) pub fn set_log_severity_level(&mut self, level: i32) -> &mut Self { panic_on_error!(ORT_API.RunOptionsSetRunLogSeverityLevel.unwrap()( self.raw.as_ptr(), @@ -344,7 +344,7 @@ impl RunOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1167-L1174) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1167-L1174) pub fn log_severity_level(&self) -> i32 { let mut level = 0; panic_on_error!(ORT_API.RunOptionsGetRunLogSeverityLevel.unwrap()( @@ -354,33 +354,33 @@ impl RunOptions { level } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1144-L1153) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1144-L1153) pub fn set_tag(&mut self, tag: &str) -> self::Result<&mut Self> { let tag = CString::new(tag)?; panic_on_error!(ORT_API.RunOptionsSetRunTag.unwrap()(self.raw.as_ptr(), tag.as_ptr())); Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1176-L1187) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1176-L1187) pub fn tag(&self) -> self::Result<&str> { let mut tag = ptr::null::(); panic_on_error!(ORT_API.RunOptionsGetRunTag.unwrap()(self.raw.as_ptr(), &mut tag)); Ok(unsafe { CStr::from_ptr(tag) }.to_str()?) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1189-L1197) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1189-L1197) pub fn set_terminate(&mut self) -> &mut Self { panic_on_error!(ORT_API.RunOptionsSetTerminate.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1199-L1207) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1199-L1207) pub fn unset_terminate(&mut self) -> &mut Self { panic_on_error!(ORT_API.RunOptionsUnsetTerminate.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) pub fn set, V: AsRef>( &mut self, config_key: K, @@ -396,7 +396,7 @@ impl RunOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) pub fn set_with_c_str, V: AsRef>( &mut self, config_key: K, @@ -410,7 +410,7 @@ impl RunOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) pub fn set_with_bytes_with_nul( &mut self, config_key: &[u8], @@ -421,7 +421,7 @@ impl RunOptions { unsafe { self.set_with_bytes_with_nul_unchecked(config_key, config_value) } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) /// /// # Safety /// @@ -437,7 +437,7 @@ impl RunOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2695-L2708) /// /// # Safety /// @@ -463,7 +463,7 @@ impl Default for RunOptions { } impl Drop for RunOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1784) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1784) fn drop(&mut self) { unsafe { ORT_API.ReleaseRunOptions.unwrap()(self.raw.as_ptr()); @@ -477,14 +477,14 @@ pub struct SessionOptions { } impl SessionOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L771-L786) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L771-L786) pub fn new() -> Self { let mut session_options = ptr::null_mut::(); panic_on_error!(ORT_API.CreateSessionOptions.unwrap()(&mut session_options)); Self { raw: NonNull::new(session_options).unwrap() } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L921-L934) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L921-L934) pub fn set_intra_op_num_threads(&mut self, intra_op_num_threads: i32) -> &mut Self { panic_on_error!(ORT_API.SetIntraOpNumThreads.unwrap()( self.raw.as_ptr(), @@ -493,7 +493,7 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L936-L948) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L936-L948) pub fn set_inter_op_num_threads(&mut self, inter_op_num_threads: i32) -> &mut Self { panic_on_error!(ORT_API.SetInterOpNumThreads.unwrap()( self.raw.as_ptr(), @@ -502,7 +502,7 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L910-L919) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L910-L919) pub fn set_graph_optimization_level( &mut self, graph_optimization_level: GraphOptimizationLevel, @@ -514,19 +514,19 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L863-L871) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L863-L871) pub fn enable_cpu_mem_arena(&mut self) -> &mut Self { panic_on_error!(ORT_API.EnableCpuMemArena.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L873-L879) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L873-L879) pub fn disable_cpu_mem_arena(&mut self) -> &mut Self { panic_on_error!(ORT_API.DisableCpuMemArena.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L788-L796) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L788-L796) pub fn set_optimized_model_file_path>( &mut self, optimized_model_file_path: P, @@ -545,7 +545,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L821-L828) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L821-L828) pub fn enable_profiling>( &mut self, profile_file_prefix: P, @@ -564,25 +564,25 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L830-L836) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L830-L836) pub fn disable_profiling(&mut self) -> &mut Self { panic_on_error!(ORT_API.DisableProfiling.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L838-L851) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L838-L851) pub fn enable_mem_pattern(&mut self) -> &mut Self { panic_on_error!(ORT_API.EnableMemPattern.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L853-L861) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L853-L861) pub fn disable_mem_pattern(&mut self) -> &mut Self { panic_on_error!(ORT_API.DisableMemPattern.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L808-L819) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L808-L819) pub fn set_execution_mode(&mut self, execution_mode: ExecutionMode) -> &mut Self { panic_on_error!(ORT_API.SetSessionExecutionMode.unwrap()( self.raw.as_ptr(), @@ -591,38 +591,38 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L881-L888) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L881-L888) pub fn set_log_id(&mut self, log_id: &str) -> self::Result<&mut Self> { let log_id = CString::new(log_id)?; panic_on_error!(ORT_API.SetSessionLogId.unwrap()(self.raw.as_ptr(), log_id.as_ptr(),)); Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L890-L899) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L890-L899) pub fn set_log_verbosity_level(&mut self, level: i32) -> &mut Self { panic_on_error!(ORT_API.SetSessionLogVerbosityLevel.unwrap()(self.raw.as_ptr(), level,)); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L901-L908) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L901-L908) pub fn set_log_severity_level(&mut self, level: i32) -> &mut Self { panic_on_error!(ORT_API.SetSessionLogSeverityLevel.unwrap()(self.raw.as_ptr(), level,)); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2023-L2032) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2023-L2032) pub fn disable_per_session_threads(&mut self) -> &mut Self { panic_on_error!(ORT_API.DisablePerSessionThreads.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2861-L2867) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2861-L2867) pub fn enable_ort_custom_ops(&mut self) -> &mut Self { panic_on_error!(ORT_API.EnableOrtCustomOps.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2146-L2159) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2146-L2159) pub fn set_session_config_entry( &mut self, config_key: &str, @@ -638,7 +638,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3849-L3878) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3849-L3878) pub fn session_config_entry(&self, config_key: &str) -> self::Result { let config_key = CString::new(config_key)?; let mut size = 0; @@ -661,7 +661,7 @@ impl SessionOptions { Ok(CString::from_vec_with_nul(config_value)?.into_string()?) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3831-L3847) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3831-L3847) pub fn has_session_config_entry(&self, config_key: &str) -> self::Result { let config_key = CString::new(config_key)?; let mut has_session_config_entry = 0; @@ -673,7 +673,7 @@ impl SessionOptions { Ok(has_session_config_entry != 0) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1547-L1559) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1547-L1559) pub fn set_free_dimension_by_denotation( &mut self, dim_denotation: &str, @@ -688,7 +688,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2069-L2078) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2069-L2078) pub fn set_free_dimension_by_name( &mut self, dim_name: &str, @@ -703,7 +703,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2424-L2439) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2424-L2439) pub fn set_initializer<'s, 'v: 's>( &'s mut self, name: &str, @@ -718,7 +718,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) pub fn set_external_initializers<'s, 'v: 's, I: AsRef>( &'s mut self, initializer_names: &[I], @@ -728,7 +728,7 @@ impl SessionOptions { unsafe { self.set_external_initializers_unchecked(initializer_names, initializers) } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) /// /// # Safety /// @@ -748,7 +748,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) pub fn set_external_initializers_with_c_str<'s, 'v: 's, I: AsRef>( &'s mut self, initializer_names: &[I], @@ -760,7 +760,7 @@ impl SessionOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) /// /// # Safety /// @@ -778,7 +778,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) pub fn set_external_initializers_with_bytes_with_nul<'s, 'v: 's>( &'s mut self, initializer_names: &[&[u8]], @@ -794,7 +794,7 @@ impl SessionOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) /// /// # Safety /// @@ -813,7 +813,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3376-L3399) /// /// # Safety /// @@ -834,7 +834,7 @@ impl SessionOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3197-L3204) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3197-L3204) pub fn set_custom_create_thread_fn( &mut self, custom_create_thread_fn: OrtCustomCreateThreadFn, @@ -846,7 +846,7 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3206-L3213) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3206-L3213) #[allow(clippy::not_unsafe_ptr_arg_deref)] pub fn set_custom_thread_creation_options( &mut self, @@ -859,7 +859,7 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3215-L3222) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3215-L3222) pub fn set_custom_join_thread_fn( &mut self, custom_join_thread_fn: OrtCustomJoinThreadFn, @@ -871,7 +871,7 @@ impl SessionOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) pub fn append_execution_provider, V: AsRef>( &mut self, provider_name: &str, @@ -888,7 +888,7 @@ impl SessionOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) /// /// # Safety /// @@ -915,7 +915,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) pub fn append_execution_provider_with_c_str, V: AsRef>( &mut self, provider_name: &CStr, @@ -932,7 +932,7 @@ impl SessionOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) /// /// # Safety /// @@ -955,7 +955,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) pub fn append_execution_provider_with_bytes_with_nul( &mut self, provider_name: &[u8], @@ -975,7 +975,7 @@ impl SessionOptions { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) /// /// # Safety /// @@ -1000,7 +1000,7 @@ impl SessionOptions { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3485-L3523) /// /// # Safety /// @@ -1026,7 +1026,7 @@ impl SessionOptions { } impl Clone for SessionOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L798-L806) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L798-L806) fn clone(&self) -> Self { let mut session_options = ptr::null_mut::(); panic_on_error!(ORT_API.CloneSessionOptions.unwrap()( @@ -1044,7 +1044,7 @@ impl Default for SessionOptions { } impl Drop for SessionOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1796) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1796) fn drop(&mut self) { unsafe { ORT_API.ReleaseSessionOptions.unwrap()(self.raw.as_ptr()); @@ -1058,7 +1058,7 @@ pub struct ModelMetadata { } impl ModelMetadata { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1931-L1940) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1931-L1940) pub fn producer_name(&self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut name_ptr = ptr::null_mut::(); @@ -1074,7 +1074,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1942-L1951) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1942-L1951) pub fn graph_name(&self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut name_ptr = ptr::null_mut::(); @@ -1090,7 +1090,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2544-L2556) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2544-L2556) pub fn graph_description(&self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut description_ptr = ptr::null_mut::(); @@ -1106,7 +1106,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1953-L1962) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1953-L1962) pub fn domain(&self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut domain_ptr = ptr::null_mut::(); @@ -1122,7 +1122,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1964-L1973) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1964-L1973) pub fn description(&self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut description_ptr = ptr::null_mut::(); @@ -1138,7 +1138,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2051-L2063) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2051-L2063) pub fn custom_metadata_map_keys(&self, allocator: &mut Allocator) -> self::Result> { let allocator = allocator.raw.as_ptr(); let mut keys_ptr = ptr::null_mut::<*mut c_char>(); @@ -1165,7 +1165,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1975-L1986) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1975-L1986) pub fn lookup_custom_metadata_map( &self, allocator: &mut Allocator, @@ -1191,7 +1191,7 @@ impl ModelMetadata { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1988-L1995) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1988-L1995) pub fn version(&self) -> i64 { let mut version = 0; panic_on_error!(ORT_API.ModelMetadataGetVersion.unwrap()(self.raw.as_ptr(), &mut version)); @@ -1200,7 +1200,7 @@ impl ModelMetadata { } impl Drop for ModelMetadata { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1997) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1997) fn drop(&mut self) { unsafe { ORT_API.ReleaseModelMetadata.unwrap()(self.raw.as_ptr()); @@ -1218,7 +1218,7 @@ pub struct Session { } impl Session { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L713-L728) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L713-L728) pub fn new_with_model_path>( env: Arc>, model_path: P, @@ -1239,7 +1239,7 @@ impl Session { Ok(Session { raw: NonNull::new(session).unwrap(), env, prepacked_weights_container: None }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2738-L2757) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2738-L2757) pub fn new_with_model_path_and_prepacked_weights_container>( env: Arc>, model_path: P, @@ -1266,7 +1266,7 @@ impl Session { }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L730-L741) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L730-L741) pub fn new_with_model_data( env: Arc>, model_data: &[u8], @@ -1283,7 +1283,7 @@ impl Session { Ok(Session { raw: NonNull::new(session).unwrap(), env, prepacked_weights_container: None }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2759-L2780) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2759-L2780) pub fn new_with_model_data_and_prepacked_weights_container( env: Arc>, model_data: &[u8], @@ -1306,7 +1306,7 @@ impl Session { }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) pub fn run, O: AsRef>( &mut self, run_options: Option<&RunOptions>, @@ -1322,7 +1322,7 @@ impl Session { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) /// /// # Safety /// @@ -1353,7 +1353,7 @@ impl Session { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) pub fn run_with_c_str, O: AsRef>( &mut self, run_options: Option<&RunOptions>, @@ -1375,7 +1375,7 @@ impl Session { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) /// /// # Safety /// @@ -1402,7 +1402,7 @@ impl Session { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) pub fn run_with_bytes_with_nul( &mut self, run_options: Option<&RunOptions>, @@ -1426,7 +1426,7 @@ impl Session { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) /// /// # Safety /// @@ -1454,7 +1454,7 @@ impl Session { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L743-L765) /// /// # Safety /// @@ -1484,7 +1484,7 @@ impl Session { Ok(()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2184-L2194) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2184-L2194) pub fn run_with_binding( &mut self, run_options: &RunOptions, @@ -1498,21 +1498,21 @@ impl Session { Ok(()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1011-L1022) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1011-L1022) pub fn input_count(&self) -> self::Result { let mut count = 0; bail_on_error!(ORT_API.SessionGetInputCount.unwrap()(self.raw.as_ptr(), &mut count)); Ok(count) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1024-L1035) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1024-L1035) pub fn output_count(&self) -> self::Result { let mut count = 0; bail_on_error!(ORT_API.SessionGetOutputCount.unwrap()(self.raw.as_ptr(), &mut count)); Ok(count) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1037-L1046) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1037-L1046) pub fn overridable_initializer_count(&self) -> self::Result { let mut count = 0; bail_on_error!(ORT_API.SessionGetOverridableInitializerCount.unwrap()( @@ -1526,7 +1526,7 @@ impl Session { self.input_name_using_allocator(index, &mut ALLOCATOR_WITH_DEFAULT_OPTIONS.lock().unwrap()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1078-L1087) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1078-L1087) pub fn input_name_using_allocator( &self, index: usize, @@ -1551,7 +1551,7 @@ impl Session { self.output_name_using_allocator(index, &mut ALLOCATOR_WITH_DEFAULT_OPTIONS.lock().unwrap()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1089-L1098) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1089-L1098) pub fn output_name_using_allocator( &self, index: usize, @@ -1579,7 +1579,7 @@ impl Session { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1100-L1110) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1100-L1110) pub fn overridable_initializer_name_using_allocator( &self, index: usize, @@ -1651,7 +1651,7 @@ impl Session { .map(move |i| self.overridable_initializer_name_using_allocator(i, allocator))) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1906-L1916) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1906-L1916) pub fn end_profiling(&mut self, allocator: &mut Allocator) -> self::Result { let allocator = allocator.raw.as_ptr(); let mut profile_ptr = ptr::null_mut::(); @@ -1667,7 +1667,7 @@ impl Session { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2364-L2373) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2364-L2373) pub fn profiling_start_time_ns(&self) -> u64 { let mut time = 0; panic_on_error!(ORT_API.SessionGetProfilingStartTimeNs.unwrap()( @@ -1677,7 +1677,7 @@ impl Session { time } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1918-L1925) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1918-L1925) pub fn model_metadata(&self) -> self::Result { let mut model_metadata = ptr::null_mut::(); bail_on_error!(ORT_API.SessionGetModelMetadata.unwrap()( @@ -1687,7 +1687,7 @@ impl Session { Ok(ModelMetadata { raw: NonNull::new(model_metadata).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1048-L1056) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1048-L1056) pub fn input_type_info(&self, index: usize) -> self::Result { let mut type_info = ptr::null_mut::(); bail_on_error!(ORT_API.SessionGetInputTypeInfo.unwrap()( @@ -1698,7 +1698,7 @@ impl Session { Ok(TypeInfo { raw: NonNull::new(type_info).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1058-L1066) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1058-L1066) pub fn output_type_info(&self, index: usize) -> self::Result { let mut type_info = ptr::null_mut::(); bail_on_error!(ORT_API.SessionGetOutputTypeInfo.unwrap()( @@ -1709,7 +1709,7 @@ impl Session { Ok(TypeInfo { raw: NonNull::new(type_info).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1068-L1076) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1068-L1076) pub fn overridable_initializer_type_info(&self, index: usize) -> self::Result { let mut type_info = ptr::null_mut::(); bail_on_error!(ORT_API.SessionGetOverridableInitializerTypeInfo.unwrap()( @@ -1722,7 +1722,7 @@ impl Session { } impl Drop for Session { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1776) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1776) fn drop(&mut self) { unsafe { ORT_API.ReleaseSession.unwrap()(self.raw.as_ptr()); @@ -1741,30 +1741,30 @@ pub struct TensorTypeAndShapeInfo { } impl TensorTypeAndShapeInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1338-L1344) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1338-L1344) pub fn new() -> Self { let mut tensor_type_info = ptr::null_mut::(); panic_on_error!(ORT_API.CreateTensorTypeAndShapeInfo.unwrap()(&mut tensor_type_info)); Self { raw: NonNull::new(tensor_type_info).unwrap() } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1346-L1353) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1346-L1353) pub fn set_element_type(&mut self, typ: ONNXTensorElementDataType) -> &mut Self { panic_on_error!(ORT_API.SetTensorElementType.unwrap()(self.raw.as_ptr(), typ)); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) pub fn element_type(&self) -> ONNXTensorElementDataType { element_type(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) pub fn element_count(&self) -> i64 { element_count(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1355-L1363) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1355-L1363) pub fn set_dimensions(&mut self, dims: &[i64]) -> &mut Self { panic_on_error!(ORT_API.SetDimensions.unwrap()( self.raw.as_ptr(), @@ -1774,17 +1774,17 @@ impl TensorTypeAndShapeInfo { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) pub fn dimensions_count(&self) -> usize { dimensions_count(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) pub fn dimensions(&self) -> Vec { dimensions(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) pub fn symbolic_dimensions(&self) -> self::Result> { symbolic_dimensions(unsafe { self.raw.as_ref() }) } @@ -1797,7 +1797,7 @@ impl Default for TensorTypeAndShapeInfo { } impl Drop for TensorTypeAndShapeInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1792) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1792) fn drop(&mut self) { unsafe { ORT_API.ReleaseTensorTypeAndShapeInfo.unwrap()(self.raw.as_ptr()); @@ -1811,40 +1811,40 @@ pub struct UnownedTensorTypeAndShapeInfo<'a> { } impl<'a> UnownedTensorTypeAndShapeInfo<'a> { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) pub fn element_type(&self) -> ONNXTensorElementDataType { element_type(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) pub fn element_count(&self) -> i64 { element_count(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) pub fn dimensions_count(&self) -> usize { dimensions_count(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) pub fn dimensions(&self) -> Vec { dimensions(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) pub fn symbolic_dimensions(&self) -> self::Result> { symbolic_dimensions(self.raw) } } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1365-L1375) fn element_type(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> ONNXTensorElementDataType { let mut typ = ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED; panic_on_error!(ORT_API.GetTensorElementType.unwrap()(tensor_type_info, &mut typ)); typ } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1410-L1426) fn element_count(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> i64 { let mut count = 0; panic_on_error!(ORT_API.GetTensorShapeElementCount.unwrap()( @@ -1855,14 +1855,14 @@ fn element_count(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> i64 { count } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1377-L1386) fn dimensions_count(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> usize { let mut count = 0; panic_on_error!(ORT_API.GetDimensionsCount.unwrap()(tensor_type_info, &mut count)); count } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1388-L1397) fn dimensions(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> Vec { let mut dims = vec![0; dimensions_count(tensor_type_info)]; panic_on_error!(ORT_API.GetDimensions.unwrap()( @@ -1873,7 +1873,7 @@ fn dimensions(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> Vec { dims } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1399-L1408) fn symbolic_dimensions(tensor_type_info: &OrtTensorTypeAndShapeInfo) -> self::Result> { let mut dimensions = vec![ptr::null::(); dimensions_count(tensor_type_info)]; panic_on_error!(ORT_API.GetSymbolicDimensions.unwrap()( @@ -1892,7 +1892,7 @@ pub struct TypeInfo { } impl TypeInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1315-L1323) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1315-L1323) pub fn cast_to_tensor_type_info(&self) -> Option> { let mut tensor_info = ptr::null::(); panic_on_error!(ORT_API.CastTypeInfoToTensorInfo.unwrap()( @@ -1906,14 +1906,14 @@ impl TypeInfo { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1325-L1332) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1325-L1332) pub fn onnx_type(&self) -> ONNXType { let mut typ = ONNX_TYPE_UNKNOWN; panic_on_error!(ORT_API.GetOnnxTypeFromTypeInfo.unwrap()(self.raw.as_ptr(), &mut typ)); typ } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1806-L1819) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1806-L1819) pub fn denotation(&self) -> self::Result<&str> { let mut denotation = ptr::null::(); let mut length = 0; @@ -1927,7 +1927,7 @@ impl TypeInfo { } impl Drop for TypeInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1788) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1788) fn drop(&mut self) { unsafe { ORT_API.ReleaseTypeInfo.unwrap()(self.raw.as_ptr()); @@ -1982,7 +1982,7 @@ impl<'d> Value<'d> { ) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1213-L1226) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1213-L1226) pub fn new_tensor_using_allocator( allocator: &mut Allocator, shape: &[i64], @@ -1999,7 +1999,7 @@ impl<'d> Value<'d> { Ok(Value { raw: value, phantom: PhantomData }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1228-L1245) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1228-L1245) pub fn new_tensor_with_data( memory_info: &MemoryInfo, data: &'d mut [T], @@ -2018,14 +2018,14 @@ impl<'d> Value<'d> { Ok(Value { raw: value, phantom: PhantomData }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1247-L1254) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1247-L1254) pub fn is_tensor(&self) -> bool { let mut result = 0; panic_on_error!(ORT_API.IsTensor.unwrap()(self.raw, &mut result)); result != 0 } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1256-L1266) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1256-L1266) /// /// # Safety /// @@ -2049,7 +2049,7 @@ impl<'d> Value<'d> { } let mut element_count = self.tensor_type_info()?.element_count(); - // https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1413 + // https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1413 // // > If any dimension is less than 0, the result is always -1. if element_count < 0 { @@ -2059,7 +2059,7 @@ impl<'d> Value<'d> { Ok(unsafe { slice::from_raw_parts(data, element_count.try_into()?) }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1256-L1266) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1256-L1266) /// /// # Safety /// @@ -2083,7 +2083,7 @@ impl<'d> Value<'d> { } let mut element_count = self.tensor_type_info()?.element_count(); - // https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1413 + // https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1413 // // > If any dimension is less than 0, the result is always -1. if element_count < 0 { @@ -2093,7 +2093,7 @@ impl<'d> Value<'d> { Ok(unsafe { slice::from_raw_parts_mut(data, element_count.try_into()?) }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2310-L2324) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2310-L2324) /// /// # Safety /// @@ -2109,7 +2109,7 @@ impl<'d> Value<'d> { Ok(&*element) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2310-L2324) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2310-L2324) /// /// # Safety /// @@ -2125,11 +2125,11 @@ impl<'d> Value<'d> { Ok(&mut *element) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1441-L1448) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1441-L1448) pub fn type_info(&self) -> self::Result> { let mut type_info = ptr::null_mut::(); bail_on_error!(ORT_API.GetTypeInfo.unwrap()(self.raw, &mut type_info)); - // https://github.com/microsoft/onnxruntime/blob/v1.14.0/onnxruntime/core/framework/tensor_type_and_shape.cc#L328-L334 + // https://github.com/microsoft/onnxruntime/blob/v1.14.1/onnxruntime/core/framework/tensor_type_and_shape.cc#L328-L334 // // > // TODO: This is consistent with the previous implementation but inconsistent with // > // GetValueType which returns ONNX_TYPE_UNKNOWN if v->Type() is null. Should we @@ -2146,28 +2146,28 @@ impl<'d> Value<'d> { }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1432-L1439) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1432-L1439) pub fn tensor_type_info(&self) -> self::Result { let mut tensor_type_info = ptr::null_mut::(); bail_on_error!(ORT_API.GetTensorTypeAndShape.unwrap()(self.raw, &mut tensor_type_info)); Ok(TensorTypeAndShapeInfo { raw: NonNull::new(tensor_type_info).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3170-L3176) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3170-L3176) pub fn tensor_memory_info(&self) -> UnownedMemoryInfo<'_> { let mut memory_info = ptr::null::(); panic_on_error!(ORT_API.GetTensorMemoryInfo.unwrap()(self.raw, &mut memory_info)); UnownedMemoryInfo { raw: unsafe { &*memory_info } } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1450-L1457) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1450-L1457) pub fn value_type(&self) -> self::Result { let mut value_type = ONNX_TYPE_UNKNOWN; bail_on_error!(ORT_API.GetValueType.unwrap()(self.raw, &mut value_type)); Ok(value_type) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3135-L3147) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3135-L3147) pub fn has_value(&self) -> bool { let mut has_value = 0; panic_on_error!(ORT_API.HasValue.unwrap()(self.raw, &mut has_value)); @@ -2182,7 +2182,7 @@ impl<'d> Default for Value<'d> { } impl<'d> Drop for Value<'d> { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1780) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1780) fn drop(&mut self) { unsafe { ORT_API.ReleaseValue.unwrap()(self.raw); @@ -2196,7 +2196,7 @@ pub struct MemoryInfo { } impl MemoryInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1463-L1474) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1463-L1474) pub fn new( name: &str, allocator_type: OrtAllocatorType, @@ -2215,7 +2215,7 @@ impl MemoryInfo { Ok(MemoryInfo { raw: NonNull::new(memory_info).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1476-L1487) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1476-L1487) pub fn new_for_cpu(allocator_type: OrtAllocatorType, memory_type: OrtMemType) -> Self { let mut memory_info = ptr::null_mut::(); panic_on_error!(ORT_API.CreateCpuMemoryInfo.unwrap()( @@ -2226,34 +2226,34 @@ impl MemoryInfo { MemoryInfo { raw: NonNull::new(memory_info).unwrap() } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) pub fn allocator_name(&self) -> self::Result<&str> { memory_info_allocator_name(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) pub fn allocator_type(&self) -> OrtAllocatorType { memory_info_allocator_type(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) pub fn device_id(&self) -> i32 { memory_info_device_id(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) pub fn device_type(&self) -> OrtMemoryInfoDeviceType { memory_info_device_type(unsafe { self.raw.as_ref() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) pub fn memory_type(&self) -> OrtMemType { memory_info_memory_type(unsafe { self.raw.as_ref() }) } } impl Drop for MemoryInfo { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1772) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1772) fn drop(&mut self) { unsafe { ORT_API.ReleaseMemoryInfo.unwrap()(self.raw.as_ptr()); @@ -2279,27 +2279,27 @@ pub struct UnownedMemoryInfo<'a> { } impl<'a> UnownedMemoryInfo<'a> { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) pub fn allocator_name(&self) -> self::Result<&str> { memory_info_allocator_name(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) pub fn allocator_type(&self) -> OrtAllocatorType { memory_info_allocator_type(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) pub fn device_id(&self) -> i32 { memory_info_device_id(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) pub fn device_type(&self) -> OrtMemoryInfoDeviceType { memory_info_device_type(self.raw) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) pub fn memory_type(&self) -> OrtMemType { memory_info_memory_type(self.raw) } @@ -2317,42 +2317,42 @@ impl PartialEq for UnownedMemoryInfo<'_> { } } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1501-L1508) fn memory_info_allocator_name(memory_info: &OrtMemoryInfo) -> self::Result<&str> { let mut name = ptr::null::(); panic_on_error!(ORT_API.MemoryInfoGetName.unwrap()(memory_info, &mut name)); Ok(unsafe { CStr::from_ptr(name) }.to_str()?) } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1518-L1520) fn memory_info_allocator_type(memory_info: &OrtMemoryInfo) -> OrtAllocatorType { let mut allocator_type = OrtAllocatorType::OrtInvalidAllocator; panic_on_error!(ORT_API.MemoryInfoGetType.unwrap()(memory_info, &mut allocator_type)); allocator_type } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1510-L1512) fn memory_info_device_id(memory_info: &OrtMemoryInfo) -> i32 { let mut device_id = 0; panic_on_error!(ORT_API.MemoryInfoGetId.unwrap()(memory_info, &mut device_id)); device_id } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3614-L3618) fn memory_info_device_type(memory_info: &OrtMemoryInfo) -> OrtMemoryInfoDeviceType { let mut device_type = OrtMemoryInfoDeviceType_CPU; unsafe { ORT_API.MemoryInfoGetDeviceType.unwrap()(memory_info, &mut device_type) }; device_type } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1514-L1516) fn memory_info_memory_type(memory_info: &OrtMemoryInfo) -> OrtMemType { let mut memory_type = OrtMemTypeDefault; panic_on_error!(ORT_API.MemoryInfoGetMemType.unwrap()(memory_info, &mut memory_type)); memory_type } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1489-L1499) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1489-L1499) fn memory_info_is_equal(lhs: &OrtMemoryInfo, rhs: &OrtMemoryInfo) -> bool { let mut is_equal = 0; panic_on_error!(ORT_API.CompareMemoryInfo.unwrap()(lhs, rhs, &mut is_equal)); @@ -2365,7 +2365,7 @@ pub struct Allocator { } impl Allocator { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2165-L2174) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2165-L2174) pub fn new(session: &Session, memory_info: &MemoryInfo) -> self::Result { let mut allocator = ptr::null_mut::(); bail_on_error!(ORT_API.CreateAllocator.unwrap()( @@ -2376,7 +2376,7 @@ impl Allocator { Ok(Self { raw: NonNull::new(allocator).unwrap() }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1526-L1527) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1526-L1527) pub fn alloc(&mut self) -> *mut T { let mut ptr = ptr::null_mut::(); panic_on_error!(ORT_API.AllocatorAlloc.unwrap()( @@ -2387,7 +2387,7 @@ impl Allocator { ptr } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1528-L1529) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1528-L1529) /// /// # Safety /// @@ -2396,7 +2396,7 @@ impl Allocator { panic_on_error!(ORT_API.AllocatorFree.unwrap()(self.raw.as_ptr(), ptr as *mut c_void)); } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L1530-L1531) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L1530-L1531) pub fn memory_info(&self) -> UnownedMemoryInfo<'_> { let mut memory_info = ptr::null::(); panic_on_error!(ORT_API.AllocatorGetInfo.unwrap()(self.raw.as_ptr(), &mut memory_info)); @@ -2405,7 +2405,7 @@ impl Allocator { } impl Drop for Allocator { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2176-L2178) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2176-L2178) fn drop(&mut self) { unsafe { ORT_API.ReleaseAllocator.unwrap()(self.raw.as_ptr()) } } @@ -2422,28 +2422,28 @@ pub struct IoBinding<'s> { } impl<'s> IoBinding<'s> { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2196-L2207) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2196-L2207) pub fn new(session: &'s mut Session) -> self::Result { let mut io_binding = ptr::null_mut::(); bail_on_error!(ORT_API.CreateIoBinding.unwrap()(session.raw.as_ptr(), &mut io_binding)); Ok(Self { raw: NonNull::new(io_binding).unwrap(), phantom: PhantomData }) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2217-L2227) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2217-L2227) pub fn bind_input(&mut self, name: &str, value: &Value<'_>) -> self::Result<&mut Self> { let name = CString::new(name)?; bail_on_error!(ORT_API.BindInput.unwrap()(self.raw.as_ptr(), name.as_ptr(), value.raw)); Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2229-L2239) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2229-L2239) pub fn bind_output(&mut self, name: &str, value: &Value<'_>) -> self::Result<&mut Self> { let name = CString::new(name)?; panic_on_error!(ORT_API.BindOutput.unwrap()(self.raw.as_ptr(), name.as_ptr(), value.raw)); Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2241-L2256) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2241-L2256) pub fn bind_output_to_device( &mut self, name: &str, @@ -2458,7 +2458,7 @@ impl<'s> IoBinding<'s> { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2258-L2276) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2258-L2276) pub fn bound_output_names(&self, allocator: &mut Allocator) -> self::Result> { let allocator = allocator.raw.as_ptr(); let mut buffer = ptr::null_mut::(); @@ -2491,7 +2491,7 @@ impl<'s> IoBinding<'s> { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2278-L2296) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2278-L2296) pub fn bound_output_values( &self, allocator: &mut Allocator, @@ -2519,27 +2519,27 @@ impl<'s> IoBinding<'s> { } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2298-L2300) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2298-L2300) pub fn clear_bound_inputs(&mut self) { unsafe { ORT_API.ClearBoundInputs.unwrap()(self.raw.as_ptr()); } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2302-L2304) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2302-L2304) pub fn clear_bound_outputs(&mut self) { unsafe { ORT_API.ClearBoundOutputs.unwrap()(self.raw.as_ptr()); } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3255-L3263) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3255-L3263) pub fn synchronize_bound_inputs(&mut self) -> self::Result<()> { bail_on_error!(ORT_API.SynchronizeBoundInputs.unwrap()(self.raw.as_ptr())); Ok(()) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3265-L3273) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3265-L3273) pub fn synchronize_bound_outputs(&mut self) -> self::Result<()> { bail_on_error!(ORT_API.SynchronizeBoundOutputs.unwrap()(self.raw.as_ptr())); Ok(()) @@ -2547,7 +2547,7 @@ impl<'s> IoBinding<'s> { } impl<'s> Drop for IoBinding<'s> { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2213-L2215) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2213-L2215) fn drop(&mut self) { unsafe { ORT_API.ReleaseIoBinding.unwrap()(self.raw.as_ptr()) } } @@ -2559,14 +2559,14 @@ pub struct ThreadingOptions { } impl ThreadingOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2038-L2043) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2038-L2043) pub fn new() -> Self { let mut threading_options = ptr::null_mut::(); panic_on_error!(ORT_API.CreateThreadingOptions.unwrap()(&mut threading_options)); Self { raw: NonNull::new(threading_options).unwrap() } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2379-L2390) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2379-L2390) pub fn set_global_intra_op_num_threads(&mut self, intra_op_num_threads: i32) -> &mut Self { panic_on_error!(ORT_API.SetGlobalIntraOpNumThreads.unwrap()( self.raw.as_ptr(), @@ -2575,7 +2575,7 @@ impl ThreadingOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2392-L2403) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2392-L2403) pub fn set_global_inter_op_num_threads(&mut self, inter_op_num_threads: i32) -> &mut Self { panic_on_error!(ORT_API.SetGlobalInterOpNumThreads.unwrap()( self.raw.as_ptr(), @@ -2584,7 +2584,7 @@ impl ThreadingOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3629-L3648) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3629-L3648) pub fn set_global_intra_op_thread_affinity( &mut self, affinity: &str, @@ -2597,7 +2597,7 @@ impl ThreadingOptions { Ok(self) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2405-L2418) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2405-L2418) pub fn set_global_spin_control(&mut self, allow_spinning: bool) -> &mut Self { panic_on_error!(ORT_API.SetGlobalSpinControl.unwrap()( self.raw.as_ptr(), @@ -2606,13 +2606,13 @@ impl ThreadingOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2507-L2517) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2507-L2517) pub fn set_global_denormal_as_zero(&mut self) -> &mut Self { panic_on_error!(ORT_API.SetGlobalDenormalAsZero.unwrap()(self.raw.as_ptr())); self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3227-L3234) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3227-L3234) pub fn set_global_custom_create_thread_fn( &mut self, custom_create_thread_fn: OrtCustomCreateThreadFn, @@ -2624,7 +2624,7 @@ impl ThreadingOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3236-L3243) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3236-L3243) #[allow(clippy::not_unsafe_ptr_arg_deref)] pub fn set_global_custom_thread_creation_options( &mut self, @@ -2637,7 +2637,7 @@ impl ThreadingOptions { self } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3245-L3252) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3245-L3252) pub fn set_global_custom_join_thread_fn( &mut self, custom_join_thread_fn: OrtCustomJoinThreadFn, @@ -2657,7 +2657,7 @@ impl Default for ThreadingOptions { } impl Drop for ThreadingOptions { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2045) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2045) fn drop(&mut self) { unsafe { ORT_API.ReleaseThreadingOptions.unwrap()(self.raw.as_ptr()) } } @@ -2669,7 +2669,7 @@ pub struct ArenaCfg { } impl ArenaCfg { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) pub fn new>( arena_config_keys: &[K], arena_config_values: &[usize], @@ -2678,7 +2678,7 @@ impl ArenaCfg { unsafe { Self::new_unchecked(arena_config_keys, arena_config_values) } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) /// /// # Safety /// @@ -2695,7 +2695,7 @@ impl ArenaCfg { Self::new_with_c_str_unchecked(&arena_config_keys_c_string, arena_config_values) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) pub fn new_with_c_str>( arena_config_keys: &[K], arena_config_values: &[usize], @@ -2704,7 +2704,7 @@ impl ArenaCfg { unsafe { Self::new_with_c_str_unchecked(arena_config_keys, arena_config_values) } } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) /// /// # Safety /// @@ -2719,7 +2719,7 @@ impl ArenaCfg { Self::new_with_c_chars_with_nul(&arena_config_keys_c_char, arena_config_values) } - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2660-L2689) /// /// # Safety /// @@ -2741,7 +2741,7 @@ impl ArenaCfg { } impl Drop for ArenaCfg { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2538) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2538) fn drop(&mut self) { unsafe { ORT_API.ReleaseArenaCfg.unwrap()(self.raw.as_ptr()) } } @@ -2753,7 +2753,7 @@ pub struct PrepackedWeightsContainer { } impl PrepackedWeightsContainer { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2714-L2726) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2714-L2726) pub fn new() -> Self { let mut prepacked_weights_container = ptr::null_mut(); panic_on_error!(ORT_API.CreatePrepackedWeightsContainer.unwrap()( @@ -2770,7 +2770,7 @@ impl Default for PrepackedWeightsContainer { } impl Drop for PrepackedWeightsContainer { - /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2728-L2732) + /// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2728-L2732) fn drop(&mut self) { unsafe { ORT_API.ReleasePrepackedWeightsContainer.unwrap()(self.raw.as_ptr()) } } @@ -2780,7 +2780,7 @@ unsafe impl Send for PrepackedWeightsContainer {} unsafe impl Sync for PrepackedWeightsContainer {} -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2084-L2105) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2084-L2105) pub fn available_providers() -> self::Result> { let mut providers_ptr = ptr::null_mut::<*mut c_char>(); let mut num_providers = 0; @@ -2802,7 +2802,7 @@ pub fn available_providers() -> self::Result> { } } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L3181-L3191) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L3181-L3191) pub fn execution_provider_api(provider_name: &str) -> self::Result<*const c_void> { let mut provider_api = ptr::null::(); let provider_name_c_string = CString::new(provider_name)?; @@ -2814,13 +2814,13 @@ pub fn execution_provider_api(provider_name: &str) -> self::Result<*const c_void Ok(provider_api) } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2578-L2588) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2578-L2588) pub fn set_current_gpu_device_id(device_id: i32) -> self::Result<()> { bail_on_error!(ORT_API.SetCurrentGpuDeviceId.unwrap()(device_id)); Ok(()) } -/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.0/include/onnxruntime/core/session/onnxruntime_c_api.h#L2590-L2600) +/// [`onnxruntime_c_api.h`](https://github.com/microsoft/onnxruntime/blob/v1.14.1/include/onnxruntime/core/session/onnxruntime_c_api.h#L2590-L2600) pub fn current_gpu_device_id() -> self::Result { let mut device_id = 0; bail_on_error!(ORT_API.GetCurrentGpuDeviceId.unwrap()(&mut device_id));