You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make wasi-nn backends as separated shared libraries (#3509)
- All files under *core/iwasm/libraries/wasi-nn* are compiled as shared libraries
- *wasi-nn.c* is shared between backends
- Every backend has a separated shared library
- If wasi-nn feature is enabled, iwasm will depend on shared library libiwasm.so
instead of linking static library libvmlib.a
> If enable `WAMR_BUID_WASI_NN`, iwasm will link a shared WAMR library instead of a static one. Wasi-nn backends will be loaded dynamically at runtime. Users shall specify the path of the backend library and register it to the iwasm runtime with `--native-lib=<path of backend library>`. All shared libraries should be placed in the `LD_LIBRARY_PATH`.
21
+
22
+
### Wasm
23
+
24
+
The definition of functions provided by WASI-NN (Wasm imports) is in the header file _core/iwasm/libraries/wasi-nn/wasi_nn.h_.
12
25
13
-
By only including this file in your WASM application you will bind WASI-NN into your module.
26
+
By only including this file in a WASM application you will bind WASI-NN into your module.
14
27
15
28
## Tests
16
29
@@ -27,9 +40,8 @@ Build the runtime image for your execution target type.
There are model files(*mobilenet\**) and wasm files(*wasi-nn-example.wasm*) in the directory */workspaces/wasi-nn/rust/examples/classification-example/build* in the image of wasi-nn-example:v1.0.
149
+
There are model files(\*mobilenet\**) and wasm files(*wasi-nn-example.wasm*) in the directory */workspaces/wasi-nn/rust/examples/classification-example/build\* in the image of wasi-nn-example:v1.0.
131
150
132
151
### build iwasm and test
133
152
134
-
*TODO: May need alternative steps to build the iwasm and test in the container of wasi-nn-example:v1.0*
153
+
_TODO: May need alternative steps to build the iwasm and test in the container of wasi-nn-example:v1.0_
0 commit comments