WebAssembly / wasi-nn

Neural Network proposal for WASI
472 stars 36 forks source link

Use component model `resource`s #47

Closed abrown closed 1 year ago

abrown commented 1 year ago

Once component model resources are fully implemented, this specification should switch to using them for graphs, execution contexts, and possibly tensors (see https://github.com/WebAssembly/wasi-nn/issues/43).

geekbeast commented 1 year ago

Many of the execution context functions can be attached to graph once it is a resource. I'm not sure execution context makes sense as a resource since they shouldn't be shared (i.e they are tied to a specific instance of a graph so you will get into lifetime management issues). Doing this for large tensors could be make sense (i.e images) especially if being processed by a pipeline of components.