Add wasi_ephemeral_nn module support (#3241)
Add `wasi_ephemeral_nn` module support with optional cmake variable, which was mentioned in #3229.
This commit is contained in:
@ -567,7 +567,12 @@ wasm_native_init()
|
||||
|
||||
#if WASM_ENABLE_WASI_NN != 0
|
||||
n_native_symbols = get_wasi_nn_export_apis(&native_symbols);
|
||||
if (!wasm_native_register_natives("wasi_nn", native_symbols,
|
||||
#if WASM_ENABLE_WASI_EPHEMERAL_NN != 0
|
||||
#define wasi_nn_module_name "wasi_ephemeral_nn"
|
||||
#else /* WASM_ENABLE_WASI_EPHEMERAL_NN == 0 */
|
||||
#define wasi_nn_module_name "wasi_nn"
|
||||
#endif /* WASM_ENABLE_WASI_EPHEMERAL_NN != 0 */
|
||||
if (!wasm_native_register_natives(wasi_nn_module_name, native_symbols,
|
||||
n_native_symbols))
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user