wasi-nn: Apply new architecture (#3692)

ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3677
This commit is contained in:
liang.he
2024-08-13 09:14:52 +08:00
committed by GitHub
parent 4e31bd63b7
commit 140ff25d46
14 changed files with 482 additions and 315 deletions

View File

@ -438,12 +438,13 @@ if (WAMR_BUILD_WASI_NN EQUAL 1)
if (NOT WAMR_BUILD_WASI_NN_TFLITE EQUAL 1 AND NOT WAMR_BUILD_WASI_NN_OPENVINO EQUAL 1)
message (FATAL_ERROR " Need to select a backend for WASI-NN")
endif ()
if (WAMR_BUILD_WASI_NN_TFLITE EQUAL 1)
message (" WASI-NN backend tflite enabled")
message (" WASI-NN: backend tflite enabled")
add_definitions (-DWASM_ENABLE_WASI_NN_TFLITE)
endif ()
if (WAMR_BUILD_WASI_NN_OPENVINO EQUAL 1)
message (" WASI-NN backend openvino enabled")
message (" WASI-NN: backend openvino enabled")
add_definitions (-DWASM_ENABLE_WASI_NN_OPENVINO)
endif ()
# Variant devices
@ -459,7 +460,7 @@ if (WAMR_BUILD_WASI_NN EQUAL 1)
add_definitions (-DWASM_WASI_NN_EXTERNAL_DELEGATE_PATH="${WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH}")
endif ()
if (WAMR_BUILD_WASI_EPHEMERAL_NN EQUAL 1)
message (" WASI-NN: WASI-Ephemeral-NN enabled")
message (" WASI-NN: use 'wasi_ephemeral_nn' instead of 'wasi-nn'")
add_definitions (-DWASM_ENABLE_WASI_EPHEMERAL_NN=1)
endif()
endif ()