w3c / machine-learning-workshop

Site of W3C Workshop on Web & Machine Learning
https://www.w3.org/2020/06/machine-learning-workshop/
42 stars 12 forks source link

Targeting WASI-NN and WebNN together #96

Open mehmetoguzderin opened 4 years ago

mehmetoguzderin commented 4 years ago

The "Introducing WASI-NN" talk mentions that the design of WASI-NN can be related to WebNN and teams work together for reviews:

inspired by the WebNN effort, and they have very similar model loader API.

Will it be possible to generalize this to most aspects of WASI-NN? If so, does that imply libraries (likely in a language like Rust or ReScript) that will target WebNN can target WASI-NN with ease in the future?

CC @anssiko

anssiko commented 4 years ago

@mehmetoguzderin thank you, the proposal to approach interoperability through libraries in this case merits further investigation.

I'll let @mingqiusun and @abrown from WASI-NN and @huningxin from WebNN to share their thoughts on this, what are the possible obstacles in realizing that vision.

mingqiusun commented 4 years ago

@mehmetoguzderin It depends on whether you want to target the library for browser or a standalone Wasm execution environment. If it is latter, WASI is the standard approach for any system calls. If it is the former, note that WASI is not currently targeting the browser environment, so you will need alternative approaches other than WASI.

DanielHauschildt commented 3 years ago

@mingqiusun I guress that with wasmer-js we have wasi in the browser. As such this problem can be solved. Would be interesting to run wasm-wasi in the browser and the cloud

Any thoughts on that?

mingqiusun commented 3 years ago

@DanielHauschildt Interesting. And if the package supports wasi-nn, it would work. Currently wasi-nn is very similar to webNN's loader API, so an implementation of wasi-nn would be a fairly straightforward mapping.

anssiko commented 3 years ago

If the idea of "wasi in the browser" is explored further I'd be happy to invite involved folks to share their thoughts on one of the Web Machine Learning Community Group calls we run on a bi-weekly cadence. Please ping this issue for any movement in that space.

Another place to share ideas that sit at the Web & ML intersection is the proposals repo at https://github.com/webmachinelearning/proposals/

We'll keep an eye on that repo too and bring those proposals to the attention of the Community Group.