From 7cf308912dd7f25d8ccf1b574f5322f516ea077b Mon Sep 17 00:00:00 2001 From: Rahul Date: Tue, 30 Apr 2024 12:52:14 -0700 Subject: [PATCH] update image classification benchmark setup --- benchmarks/image-classification/README.md | 7 +++---- benchmarks/image-classification/setup.sh | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/image-classification/README.md b/benchmarks/image-classification/README.md index 92d518b1..a1c1a087 100644 --- a/benchmarks/image-classification/README.md +++ b/benchmarks/image-classification/README.md @@ -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. \ No newline at end of file +- 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. \ No newline at end of file diff --git a/benchmarks/image-classification/setup.sh b/benchmarks/image-classification/setup.sh index 74b6f400..4f0fc086 100755 --- a/benchmarks/image-classification/setup.sh +++ b/benchmarks/image-classification/setup.sh @@ -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 \ No newline at end of file