[wasi-nn] requirement of `load_by_name` implementation
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
@tonibofarull
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.
@lum1n0us This interface is already WIT compliant and uses resources. Are there any guidelines or directions for that part as WAMR?
NO. we don't have such guidelines yet. Or, following witx is another choice.
@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.