Skip to content

Commit

Permalink
fix: update version compatibility check for 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Aug 16, 2023
1 parent 33b81e4 commit 2129797
Showing 1 changed file with 3 additions and 3 deletions.
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(&14) {
match lib_minor_version.cmp(&15) {
std::cmp::Ordering::Less => panic!(
"ort 1.14 is not compatible with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.14.x', but got '{version_string}'",
"ort 1.15 is not compatible with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.15.x', but got '{version_string}'",
**G_ORT_DYLIB_PATH
),
std::cmp::Ordering::Greater => warn!(
"ort 1.14 may have compatibility issues with the ONNX Runtime binary found at `{}`; expected GetVersionString to return '1.14.x', but got '{version_string}'",
"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}'",
**G_ORT_DYLIB_PATH
),
std::cmp::Ordering::Equal => {}
Expand Down

0 comments on commit 2129797

Please sign in to comment.