Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 23 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }

[dependencies]
clap = { version = "4.5.26", features = ["derive"] }
criterion = "0.5.1"
miette = { version = "7.2.0", features = ["fancy"] }
clap = { version = "4.5.38", features = ["derive"] }
criterion = "0.6.0"
miette = { version = "7.6.0", features = ["fancy"] }
openvino = { git = "https://github.com/Rickvanderveen/openvino-rs.git", rev = "eef188a4f0fd52020bfe95822ead35f37ee4efaf", features = [
"runtime-linking",
] }
4 changes: 2 additions & 2 deletions src/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;

use criterion::{black_box, Criterion};
use criterion::Criterion;
use miette::{miette, Context, IntoDiagnostic, Result};
use openvino::CompiledModel;

Expand Down Expand Up @@ -30,7 +30,7 @@ pub fn run_benchmark_onnx(path: impl AsRef<Path>, c: &mut Criterion) -> Result<(
.create_infer_request()
.expect("failed to create inference request");

black_box(request)
std::hint::black_box(request)
.infer()
.expect("failed to complete inference");
});
Expand Down
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ fn main() -> miette::Result<()> {

let model_path = args.model_path;
if !model_path.exists() {
eprintln!("Model file not found: {model_path:?}");
eprintln!("Model file not found: {}", model_path.display());
std::process::exit(1);
}

let Some(model_path_str) = model_path.to_str() else {
eprintln!("Model file path is not valid UTF-8: {model_path:?}");
eprintln!(
"Model file path is not valid UTF-8: {}",
model_path.display()
);
std::process::exit(1);
};

Expand Down