Skip to content

Commit

Permalink
review: rename --graph to --wasi-nn-graph
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown committed Aug 22, 2023
1 parent c03abac commit 6cff07c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ci/run-wasi-nn-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ popd
cargo run -- run --mapdir fixture::$TMP_DIR \
--wasi-modules=experimental-wasi-nn $TMP_DIR/wasi-nn-example.wasm

# Build and run another example, this time using Wasmtime's --graph flag to
# Build and run another example, this time using Wasmtime's graph flag to
# preload the model.
pushd $WASMTIME_DIR/crates/wasi-nn/examples/classification-example-named
cargo build --release --target=wasm32-wasi
cp target/wasm32-wasi/release/wasi-nn-example-named.wasm $TMP_DIR
popd
cargo run -- run --mapdir fixture::$TMP_DIR --graph openvino::$TMP_DIR \
cargo run -- run --mapdir fixture::$TMP_DIR --wasi-nn-graph openvino::$TMP_DIR \
--wasi-modules=experimental-wasi-nn $TMP_DIR/wasi-nn-example-named.wasm

# Clean up the temporary directory only if it was not specified (users may want
Expand Down
6 changes: 3 additions & 3 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ pub struct RunCommand {
///
/// Each use of the flag will preload a ML model from the host directory
/// using the given model encoding. The model will be mapped to the
/// directory name: e.g., `--graph openvino:/foo/bar` will preload an
/// OpenVINO model named `bar`. Note that which model encodings are
/// directory name: e.g., `--wasi-nn-graph openvino:/foo/bar` will preload
/// an OpenVINO model named `bar`. Note that which model encodings are
/// available is dependent on the backends implemented in the
/// `wasmtime_wasi_nn` crate.
#[clap(long = "graph", value_name = "FORMAT::HOST_DIR", value_parser = parse_graphs)]
#[clap(long = "wasi-nn-graph", value_name = "FORMAT::HOST_DIR", value_parser = parse_graphs)]
graphs: Vec<(String, String)>,

/// Load the given WebAssembly module before the main module
Expand Down

0 comments on commit 6cff07c

Please sign in to comment.