w3c/machine-learning-workshop

Targeting WASI-NN and WebNN together

Opened this issue · 5 comments

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

@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.

@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.

@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?

@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.

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.