wasi-nn: Support multiple TFLite models (#2002)

Remove restrictions:
- Only 1 WASM app at a time
- Only 1 model at a time
   - `graph` and `graph-execution-context` are ignored

Refer to previous document:
e8d718096d/core/iwasm/libraries/wasi-nn/README.md
This commit is contained in:
tonibofarull
2023-03-08 08:54:06 +01:00
committed by GitHub
parent f279ba84ee
commit a15a731e12
16 changed files with 570 additions and 349 deletions

View File

@ -333,6 +333,11 @@ if (WAMR_BUILD_SGX_IPFS EQUAL 1)
endif ()
if (WAMR_BUILD_WASI_NN EQUAL 1)
message (" WASI-NN enabled")
add_definitions (-DWASM_ENABLE_WASI_NN=1)
if (WASI_NN_ENABLE_GPU EQUAL 1)
message (" WASI-NN: GPU enabled")
add_definitions (-DWASI_NN_ENABLE_GPU=1)
endif ()
endif ()
if (WAMR_BUILD_ALLOC_WITH_USER_DATA EQUAL 1)
add_definitions(-DWASM_MEM_ALLOC_WITH_USER_DATA=1)