bytecodealliance / wasi-nn

High-level bindings for wasi-nn system calls
Apache License 2.0
44 stars 33 forks source link

Meet an exception when running rust examples with buid.sh #101

Open lum1n0us opened 4 months ago

lum1n0us commented 4 months ago

I am using a debian bookworm image. Installed openvino_2024.1.0.15008(using archive). Installed wasmtime-v21.0.1 release. Cloned latest wasi-nn repo.

Meet below exception

$ pwd
/workspace/wasi-nn
$ ./build.sh rust

...
Read graph XML, first 50 characters: <?xml version="1.0" ?>
<net name="mobilenet_v2_1.0
Read graph weights, size in bytes: 13956476
thread 'main' panicked at crates/wasi-nn/src/witx.rs:45:49:
not implemented
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

I noticed that CI uses a compiled-from-source building, So switched to a new wasmtime build-from-source

$ git clone https://github.com/bytecodealliance/wasmtime --recursive wasmtime
$ cd wasmtime
$ git checkout --track origin/release-21.0.0
$ OPENVINO_INSTALL_DIR=/opt/intel/openvino cargo build -p wasmtime-cli --features wasi-nn 

but this time the exception is still there:

Read graph XML, first 50 characters: <?xml version="1.0" ?>
<net name="mobilenet_v2_1.0
Read graph weights, size in bytes: 13956476
thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openvino-sys-0.6.0/src/generated/functions.rs:3:1:
`openvino_c` function not loaded: `ie_core_create

Please guide me through. Thanks

abrown commented 4 months ago

@lum1n0us, what is going on here is that OpenVINO has switched to a new API and the Rust bindings that Wasmtime uses need to be updated to the newly-released v0.7.1 of the openvino crate. Actually @rahulchaphalkar is working on that at the moment; maybe he can CC you once that PR is ready.