From 275151dbe368b98ab2578660862f313961d30495 Mon Sep 17 00:00:00 2001 From: grorge Date: Thu, 25 Apr 2024 11:05:54 +0800 Subject: [PATCH 1/2] docs: add neural speed backend Signed-off-by: grorge --- docs/contribute/source/plugin/wasi_nn.md | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/contribute/source/plugin/wasi_nn.md b/docs/contribute/source/plugin/wasi_nn.md index 64bdcddd..ddd0e95a 100644 --- a/docs/contribute/source/plugin/wasi_nn.md +++ b/docs/contribute/source/plugin/wasi_nn.md @@ -294,6 +294,33 @@ cmake --build build cmake --install build ``` +## Build WasmEdge with WASI-NN Neural Speed Backend + +The Neural Speed backend relies on Neural Speed, we recommend the following commands to install Neural Speed. + +```bash +sudo apt update +sudo apt upgrade +sudo apt install python3-dev +wget https://raw.githubusercontent.com/intel/neural-speed/main/requirements.txt +pip install -r requirements.txt +pip install neural-speed +``` + +Then build and install WasmEdge from source: + +```bash +cd + +cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_PLUGIN_WASI_NN_BACKEND="neuralspeed" +cmake --build build + +# For the WASI-NN plugin, you should install this project. +cmake --install build +``` + +Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-NN with OpenVINO backend plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiNN.so` after installation. + ### Appendix From f2ce7a9c67c0f6cf672021f5747096e25a99f653 Mon Sep 17 00:00:00 2001 From: grorge Date: Thu, 9 May 2024 19:33:05 +0800 Subject: [PATCH 2/2] fix: backend name Signed-off-by: grorge --- docs/contribute/source/plugin/wasi_nn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contribute/source/plugin/wasi_nn.md b/docs/contribute/source/plugin/wasi_nn.md index ddd0e95a..92c0ad84 100644 --- a/docs/contribute/source/plugin/wasi_nn.md +++ b/docs/contribute/source/plugin/wasi_nn.md @@ -319,7 +319,7 @@ cmake --build build cmake --install build ``` -Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-NN with OpenVINO backend plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiNN.so` after installation. +Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-NN with Neural Speed backend plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiNN.so` after installation. ### Appendix