Stream: wasi-nn

Topic: Issues with OpenVINO 2022.3.0


view this post on Zulip Angel M (Aug 22 2023 at 07:43):

Hello! :wave:

First, thank you for all the amazing work on WASI-NN! :smiley:

I recently integrated WASI-NN in Wasm Workers Server. For testing, I took the example model that Wasmtime uses on the CI and the OpenVINO version from the GitHub Actions (2022.3.0). My environment is MacOS.

When running some simple images, I got very weird predictions. Here, the model predicted the dog is a "window screen":

Wrong predictions

Since I had to prepare the input tensor, I started to try other approaches as I thought the issue was there. It took me a while to notice that I get the right predictions when using OpenVINO 2023.0.1:

Right predictions

Is this an error you faced before? I may update the Wasmtime-wasi-nn docs to point to OpenVINO 2023 just in case other people have the same issue. About debugging it, I'm getting the same predictions consistently, so I can reproduce it if you need more information.

Thank you!

view this post on Zulip Andrew Brown (Aug 22 2023 at 16:41):

Interesting, I have never observed this, but then again I don't have time to test all of the OS + version combinations. Maybe a MacOS workflow could be added to https://github.com/intel/openvino-rs, which is the crate Wasmtime is using here?

Rust bindings for OpenVINO™ . Contribute to intel/openvino-rs development by creating an account on GitHub.

view this post on Zulip Andrew Brown (Aug 22 2023 at 16:42):

(the release notes don't seem to indicate that any major change has happened for MacOS)

This release provides functional bug fixes and capability updates for 2023.0 that enable developers to deploy applications powered by Intel® Distribution of OpenVINO™ toolkit with confidence. Note...

view this post on Zulip Andrew Brown (Aug 22 2023 at 16:44):

I have had issues in the past where I misread the output tensor due to an off-by-one error, but that doesn't seem to be the problem here.

view this post on Zulip Angel M (Aug 23 2023 at 06:35):

That could be a great addition to the openvino-rs CI. At least, we can validate the results are similar.

Yeah, I saw the skip(1) method when fetching the output but the results are not misplaced just by 1.

view this post on Zulip Angel M (Aug 23 2023 at 06:36):

which is the crate Wasmtime is using here?

Where do you refer? If you mean in Wasm Workers Server (app sample), I'm using the wasi-nn v0.4.0 crate and the wasmtime-wasi-nn 10.0.1 crate on the host side.

view this post on Zulip Matthew Tamayo-Rios (Aug 23 2023 at 09:15):

I observed this a while ago, but I can't remember the details of how I solved it. I feel like it was some bad interactions with Rosetta 2. Do you have an intel mac or an arm mac?

view this post on Zulip Angel M (Aug 23 2023 at 12:03):

I have an ARM Mac :thinking:

view this post on Zulip Angel M (Aug 23 2023 at 15:24):

It would be interesting to research a bit more, but it seems to be solved in 2023 version

view this post on Zulip Matthew Tamayo-Rios (Aug 23 2023 at 18:08):

When I used the arm build it didnt' work and I ended up using the Intel build with Rosetta, glad to hear it is solved in latest version.


Last updated: Dec 23 2024 at 12:05 UTC