Refactor WASI-NN to simplify support for multiple frameworks#1834
Refactor WASI-NN to simplify support for multiple frameworks#1834wenyongh merged 19 commits intobytecodealliance:mainfrom
Conversation
|
TODO
|
@tonibofarull Have you finished this item and shall I merge the PR? |
|
@wenyongh, I still need to check how it's done in wasi fdtable teardown.
Thank you! |
Got it, had better keep the PR open until you finish it. Thanks. |
829d369 to
d18b8bc
Compare
d18b8bc to
1b6831f
Compare
tonibofarull
left a comment
There was a problem hiding this comment.
Fixed the warnings.
Only tensorflow specific are appearing and this one:
/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:126:5: warning: 'import_module' attribute directive ignored [-Wattributes]
126 | __attribute__((import_module("wasi_nn")));
| ^~~~~~~~~~~~~
/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:145:5: warning: 'import_module' attribute directive ignored [-Wattributes]
145 | __attribute__((import_module("wasi_nn")));
| ^~~~~~~~~~~~~
/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:157:5: warning: 'import_module' attribute directive ignored [-Wattributes]
157 | __attribute__((import_module("wasi_nn")));
which corresponds to the import but needed in the linkage with the WASM code.
|
As stated here #1573, the next step will be to add GPU support. Also, I'll work on checking the C/C++ bindings bytecodealliance/wasi-nn#75 |
f9e95b6 to
82a6e7a
Compare
7c04bf3 to
3db310a
Compare
|
a037380 to
0c5625a
Compare
@tonibofarull The coding guideline CI check failed for wasi_nn.c, could you use clang-format-12 to format the file? sudo apt-get install clang-format-12
clang-format-12 -i --style=file path/to/fileUse `clang-format-12` or `git-clang-format-12` to check code format of
the PR, with a commit range specified. It is required to format the
code before committing the PR, or it might fail to pass the CI check:
1. Install clang-format-12.0.0
Normally we can install it by `sudo apt-get install clang-format-12`,
or download the `clang+llvm-12.0.0-xxx-tar.xz` package from
https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0
and install it
2. Format the C/C++ source file
``` shell
cd path/to/wamr/root
clang-format-12 --style file -i path/to/file
``` |
I was using the general version (no |
…ecodealliance#1834) - Reorganize the library structure - Use the latest version of `wasi-nn` wit (Oct 25, 2022): https://github.com/WebAssembly/wasi-nn/blob/0f77c48ec195748990ff67928a4b3eef5f16c2de/wasi-nn.wit.md - Split logic that converts WASM structs to native structs in a separate file - Simplify addition of new frameworks
to me, the comment doesn't seem to make sense even in the PR where it originally has been introduced: bytecodealliance#1834 probably it was a leftover from unpublished earlier versions?
to me, the comment doesn't seem to make sense even in the PR where it originally has been introduced: bytecodealliance#1834 probably it was a leftover from unpublished earlier versions?
to me, the comment doesn't seem to make sense even in the PR where it originally has been introduced: bytecodealliance#1834 probably it was a leftover from unpublished earlier versions?
wasi-nnwit (Oct 25, 2022): https://github.com/WebAssembly/wasi-nn/blob/0f77c48ec195748990ff67928a4b3eef5f16c2de/wasi-nn.wit.md