Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tkat0/hello-wasi-nn


https://github.com/tkat0/hello-wasi-nn

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

        

# hello-wasi-nn

download test data.

```bash
FIXTURE=https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/alexnet
TMP_DIR=./tmp
mkdir -p $TMP_DIR

wget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/alexnet.bin
wget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/alexnet.xml
wget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/tensor-1x3x227x227-f32.bgr
```

build and run docker image to execute wasmtime with wasi-nn enabled.

```bash
$ docker-compose run dev
```

build test application.

```bash
root@0481d31f4627:/work/wasmtime/crates/wasi-nn/examples/classification-example# cargo build --release --target=wasm32-wasi
root@0481d31f4627:/work/wasmtime/crates/wasi-nn/examples/classification-example# cp /work/wasmtime/target/wasm32-wasi/release/wasi-nn-example.wasm /work/tmp
```

run test application

```bash
root@0481d31f4627:/work# wasmtime --mapdir fixture::./tmp ./tmp/wasi-nn-example.wasm
Read graph XML, first 50 characters: