wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

[wasi-nn] requirement of `load_by_name` implementation

Open lum1n0us opened this issue 1 year ago • 5 comments

There is a recently added function, load-by-name, in wasi-nn.

    /// Load a `graph` by name.
    ///
    /// How the host expects the names to be passed and how it stores the graphs for retrieval via
    /// this function is **implementation-specific**. This allows hosts to choose name schemes that
    /// range from simple to complex (e.g., URLs?) and caching mechanisms of various kinds.
    load-by-name: func(name: string) -> result<graph, error>;

Plus, the import name of wasi-nn now is wasi_ephemeral_nn

lum1n0us avatar Jan 31 '24 10:01 lum1n0us

@tonibofarull

lum1n0us avatar Jan 31 '24 10:01 lum1n0us

I'll start working on it as soon as I have some time. I'll post a message here to let you know when I start, in case anyone else wants to pick it up first.

tonibofarull avatar Jan 31 '24 10:01 tonibofarull

@lum1n0us This interface is already WIT compliant and uses resources. Are there any guidelines or directions for that part as WAMR?

ayakoakasaka avatar Feb 04 '24 08:02 ayakoakasaka

NO. we don't have such guidelines yet. Or, following witx is another choice.

lum1n0us avatar Feb 04 '24 09:02 lum1n0us

@ayakoakasaka I am about to synchronize wamr wasi-nn backends(@ core/iwasm/libraries/wasi-nn) to commit(https://github.com/WebAssembly/wasi-nn/commit/c0840c26066fa4dbef12d6b0f3d4762f9d6d43c7). It may need to modify several definitions in wasi_nn.h and wasi_nn_types.h. Please let me know if there is any concern.

https://github.com/bytecodealliance/wasi-nn/blob/main/rust/src/generated.rs will be my reference.

lum1n0us avatar May 28 '24 05:05 lum1n0us