Skip to content

Commit

Permalink
chore: update to onnxruntime 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Oct 3, 2023
1 parent bca00dc commit d28e8ba
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 42 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{
str::FromStr
};

const ORT_VERSION: &str = "1.15.1";
const ORT_VERSION: &str = "1.16.0";
const ORT_RELEASE_BASE_URL: &str = "https://github.com/microsoft/onnxruntime/releases/download";
const ORT_ENV_STRATEGY: &str = "ORT_STRATEGY";
const ORT_ENV_SYSTEM_LIB_LOCATION: &str = "ORT_LIB_LOCATION";
Expand Down
6 changes: 4 additions & 2 deletions src/execution_providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ pub struct ROCmExecutionProviderOptions {
pub user_compute_stream: Option<*mut c_void>,
pub default_memory_arena_cfg: Option<*mut sys::OrtArenaCfg>,
pub tunable_op_enable: bool,
pub tunable_op_tuning_enable: bool
pub tunable_op_tuning_enable: bool,
pub tunable_op_max_tuning_duration_ms: i32
}

#[derive(Debug, Clone, Default)]
Expand Down Expand Up @@ -737,7 +738,8 @@ impl ExecutionProvider {
user_compute_stream: options.user_compute_stream.unwrap_or(ptr::null_mut()),
default_memory_arena_cfg: options.default_memory_arena_cfg.unwrap_or(ptr::null_mut()),
tunable_op_enable: bool_as_int(options.tunable_op_enable),
tunable_op_tuning_enable: bool_as_int(options.tunable_op_tuning_enable)
tunable_op_tuning_enable: bool_as_int(options.tunable_op_tuning_enable),
tunable_op_max_tuning_duration_ms: options.tunable_op_max_tuning_duration_ms
};
status_to_result(ortsys![unsafe SessionOptionsAppendExecutionProvider_ROCM(session_options, &rocm_options as *const _)])
.map_err(OrtError::ExecutionProvider)?;
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ lazy_static! {
let version_string = get_version_string();
let version_string = CStr::from_ptr(version_string).to_string_lossy();
let lib_minor_version = version_string.split('.').nth(1).map(|x| x.parse::<u32>().unwrap_or(0)).unwrap_or(0);
match lib_minor_version.cmp(&15) {
match lib_minor_version.cmp(&16) {
std::cmp::Ordering::Less => panic!(
"ort 1.15 is not compatible with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.15.x', but got '{version_string}'",
"ort 1.16 is not compatible with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.16.x', but got '{version_string}'",
**G_ORT_DYLIB_PATH
),
std::cmp::Ordering::Greater => warn!(
"ort 1.15 may have compatibility issues with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.15.x', but got '{version_string}'",
"ort 1.16 may have compatibility issues with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.16.x', but got '{version_string}'",
**G_ORT_DYLIB_PATH
),
std::cmp::Ordering::Equal => {}
Expand Down

0 comments on commit d28e8ba

Please sign in to comment.