Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image-classification benchmark setup #273

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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
Loading