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

Feat: Support WASI-NN proposal #343

Closed
hydai opened this issue Aug 10, 2021 · 3 comments
Closed

Feat: Support WASI-NN proposal #343

hydai opened this issue Aug 10, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed LFX Mentorship Tasks for LFX Mentorship participants

Comments

@hydai
Copy link
Member

hydai commented Aug 10, 2021

Motivation

Machine Learning is a big topic nowadays. WasmEdge already provides a set of TensorFlow host functions to enable the ML inference in WebAssembly. However, these TensorFlow host functions are defined by us and they are just a Wasm function binding from the TensorFlow C API.

Here comes a standard, the WASI-NN proposal provides a new way to perform neural network inferencing by using a runtime-provided implementation that can leverage host native optimizations, CPU multi-threading, or powerful hardware devices such as GPUs or TPUs.

Specification

  1. Follow the Spec of WASI-NN proposal
  2. Implement related host functions in WasmEdge.
  3. Add unit tests and coverage to these functions.
  4. Take OpenVINO as WASI-NN backend and create a demo kit that is similar to Wasmtime

Appendix

  1. WasmEdge TensorFlow rust SDK: https://github.com/second-state/wasmedge_tensorflow_interface
  2. WasmEdge TensorFlow host functions: https://github.com/second-state/WasmEdge-tensorflow
  3. TensorFlow C API: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h
  4. WASI-NN proposal: https://github.com/WebAssembly/wasi-nn
  5. Implementing-wasi-nn-in-wasmtime: https://bytecodealliance.org/articles/implementing-wasi-nn-in-wasmtime
@hydai hydai added the enhancement New feature or request label Aug 10, 2021
@hydai hydai added help wanted Extra attention is needed LFX Mentorship Tasks for LFX Mentorship participants labels Aug 10, 2021
@danijak
Copy link

danijak commented Aug 12, 2021

Hi @hydai,
I am Javed Ali. I would like to apply for LFX mentorship and would like to work on it. I have experience with Machine learning & deep learning. I also have open-source experience through Google Summer of Code 2021 at NRNB. I would be really glad if you could guide me to relevant resources. Thanks

@hydai
Copy link
Member Author

hydai commented Aug 12, 2021

Hi @danijak That's cool.

WASI-NN abstracts a high-level API to allow users to execute inference with a trained model in WebAssembly.
To achieve this mission, the following background information is very important:

  1. Basic knowledge of WebAssembly spec version1.1
  2. How wasm interacts with host functions such as WASI (https://github.com/WebAssembly/WASI).
  3. After you have the basic understanding of Wasm, you can find the awesome demo which is presented by bytecodealliance. This will help you to know the relationship between Wasm, WASI-NN, and OpenVINO.

@danijak
Copy link

danijak commented Aug 13, 2021

Hi @hydai,
yes sure, I will go through these documents & will write my proposal accordingly.
Thanks

@q82419 q82419 linked a pull request Oct 12, 2021 that will close this issue
@q82419 q82419 closed this as completed Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed LFX Mentorship Tasks for LFX Mentorship participants
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants