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

Error on running example openvino-road-segmentation-adas #134

Open
nerdola-de-cartola opened this issue Apr 24, 2024 · 7 comments
Open

Error on running example openvino-road-segmentation-adas #134

nerdola-de-cartola opened this issue Apr 24, 2024 · 7 comments

Comments

@nerdola-de-cartola
Copy link

I'm running WSL2 on Ubuntu 22

I have dowloaded openvino with the folowwing comands

wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2023.list
sudo apt update
sudo apt-get -y install openvino
sudo ldconfig

Instaled wasedge with

curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_nn-openvino

Compiled the example code with

cd openvino-road-seg-adas
cargo build --target wasm32-wasi --release

And tried to run with

wasmedge --dir .:. ./openvino-road-seg-adas/target/wasm32-wasi/release/openvino-road-seg-adas.wasm ./model/road-segmentation-adas-0001.xml ./model/road-segmentation-adas-0001.bin ./image/empty_road_mapillary.jpg

But got the following erros

[2024-04-24 16:43:56.046] [error] loading failed: invalid path, Code: 0x20
[2024-04-24 16:43:56.046] [error]     load library failed:libopenvino_c.so.2302: cannot open shared object file: No such file or directory
[2024-04-24 16:43:56.046] [error] loading failed: invalid path, Code: 0x20
[2024-04-24 16:43:56.046] [error]     load library failed:libopenvino_c.so.2302: cannot open shared object file: No such file or directory
[2024-04-24 16:43:56.077] [error] WASI-NN plugin not installed. Please install the plugin and restart WasmEdge.
Error: BackendError(InvalidArgument)
Load graph ...

Seams that the problem is my openvimo installation or my wasmedge plug-in.
There any way to check this components?

@hydai
Copy link
Member

hydai commented Apr 25, 2024

What's the version of your OpenVINO?
The pre-built assets are using OpenVINO-2302. If you are using other versions, please build from source.

@nerdola-de-cartola
Copy link
Author

I have manged to compile OpenVINO-2302 from souce, but how can I link this build to my wasmedge runtime?

@hydai
Copy link
Member

hydai commented Apr 26, 2024

It uses dynamic linking. So you can put the OpenVINO library in a folder that can be searched in the system path, or you can use LD_LIBRARY_PATH to set it.

@nerdola-de-cartola
Copy link
Author

Thanks. After compiling the version 2023.0.2 and adding the openvino/bin folder to my LD_LIBRARY_PATH. Everything works fine. But it seams that in my case this demo is not making use of my GPU, is there any info about what types of gpu it can use or not?. btw I tested on an integrated gpu from Intel, maybe that's the problem?

@hydai
Copy link
Member

hydai commented Apr 30, 2024

You may need to check the OpenVINO to know how to use the GPU part. I am not familiar with OpenVINO. However, you only need to replace the CPU version library with GPU version library when using PyTorch.

@nerdola-de-cartola
Copy link
Author

Now I have a setup with pytorch + cuda

python3 -c "import torch; print(torch.__version__)"

1.10.0+cu113

python3 -c "import torchvision; print(torchvision.__version__)"

0.11.1+cu113

But when I try to execute. I got the following error

 wasmedge --dir .:. wasmedge-wasinn-example-mobilenet-image.wasm mobilenet.pt input.jpg

Loaded graph into wasi-nn with ID: 0
Created wasi-nn execution context with ID: 0
Read input tensor, size in bytes: 602112
wasmedge: symbol lookup error: /root/.wasmedge/lib/../plugin/libwasmedgePluginWasiNN.so: undefined symbol: ZNK2at6Tensor4set_EN3c107StorageElNS1_8ArrayRefIlEES4

@hydai
Copy link
Member

hydai commented May 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants