wasi-nn: Add external delegation to support several NPU/GPU (#2162)
Add VX delegation as an external delegation of TFLite, so that several NPU/GPU (from VeriSilicon, NXP, Amlogic) can be controlled via WASI-NN. Test Code can work with the X86 simulator.
This commit is contained in:
@ -341,6 +341,13 @@ if (WAMR_BUILD_WASI_NN EQUAL 1)
|
||||
message (" WASI-NN: GPU enabled")
|
||||
add_definitions (-DWASI_NN_ENABLE_GPU=1)
|
||||
endif ()
|
||||
if (WAMR_BUILD_WASI_NN_ENABLE_EXT EQUAL 1)
|
||||
message (" WASI-NN: External Delegation enabled")
|
||||
add_definitions (-DWASI_NN_ENABLE_EXTERNAL_DELEGATE=1)
|
||||
endif ()
|
||||
if (DEFINED WASI_NN_EXT_DELEGATE_PATH)
|
||||
add_definitions (-DWASI_NN_EXT_DELEGATE_PATH="${WASI_NN_EXT_DELEGATE_PATH}")
|
||||
endif ()
|
||||
endif ()
|
||||
if (WAMR_BUILD_ALLOC_WITH_USER_DATA EQUAL 1)
|
||||
add_definitions(-DWASM_MEM_ALLOC_WITH_USER_DATA=1)
|
||||
|
||||
Reference in New Issue
Block a user