Skip to content

Commit

Permalink
update image classification benchmark setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulchaphalkar committed Apr 30, 2024
1 parent 3adb762 commit 7cf3089
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions benchmarks/image-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ This benchmark uses [wasi-nn](https://github.com/WebAssembly/wasi-nn), a propose
learning (ML). It uses the OpenVINO backend to identify the subject of the test image, and measures the time required for a single inference to run.

## Steps to run this benchmark from the top sightglass directory
- `./benchmarks/image-classification/setup.sh`
- `source benchmarks/image-classification/openvino/setupvars.sh`
- `source ./benchmarks/image-classification/setup.sh`
- `cargo run -- benchmark --engine engines/wasmtime/libengine.so --engine-flags=--wasi nn -- benchmarks/image-classification/image-classification-benchmark.wasm`
## Notes:
- You must install and setup OpenVINO to run this benchmark. You can install OpenVINO and the other required files by running `setup.sh`. You'll also need to call `source benchmarks/image-classification/openvino/setupvars.sh` to set up the OpenVINO enviromnent variables each time you start a new terminal.
- You must use `--engine-flags=--wasi-modules=experimental-wasi-nn` when running this benchmark. Otherwise Wasmtime won't link the required wasi-nn functions.
- You must install and setup OpenVINO to run this benchmark. You can install OpenVINO and the other required files by sourcing `setup.sh` which also sets up the OpenVINO enviromnent variables. Do this each time you start a new terminal.
- You must use `--engine-flags=--wasi-modules=--wasi nn` when running this benchmark. Otherwise Wasmtime won't link the required wasi-nn functions.
1 change: 1 addition & 0 deletions benchmarks/image-classification/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ MODEL=https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtur
[ ! -d ${WASI_NN_DIR}/openvino ] && wget -nc -q --no-check-certificate https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.2/linux/${FILENAME}.tgz -O ${WASI_NN_DIR}/${FILENAME}.tgz
[ ! -d ${WASI_NN_DIR}/openvino ] && wget -nc -q --no-check-certificate https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.2/linux/${FILENAME}.tgz -O ${WASI_NN_DIR}/${FILENAME}.tgz
[ ! -d ${WASI_NN_DIR}/openvino ] && tar -C ${WASI_NN_DIR} -zxf ${WASI_NN_DIR}/${FILENAME}.tgz && mv ${WASI_NN_DIR}/${FILENAME} ${WASI_NN_DIR}/openvino || echo "OpenVINO is already there, skipping..."
. ${WASI_NN_DIR}/openvino/setupvars.sh

0 comments on commit 7cf3089

Please sign in to comment.