Open yamt opened 1 year ago
wasi-nn context is managed within the library. The motivations are the following:
What would be required to support it with threads? Reduce the granularity of the context from wasm instance to thread?
What would be required to support it with threads?
i don't know. probably
wasm_deinstantiate and aot_deinstantiate call wasi_nn_destroy only for !is_sub_inst.
on the other hand, wasm_runtime_get_wasi_nn_ctx seems to allocate the context for each instances.
probaby it just means that (this implementation of?) wasi-nn is not compatible with threads.