wasi-nn: Improve TPU support (#2447)
1. Allow TPU and GPU support at the same time. 2. Add Dockerfile to run example with [Coral USB](https://coral.ai/products/accelerator/).
This commit is contained in:
@ -359,16 +359,16 @@ 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)
|
||||
if (WAMR_BUILD_WASI_NN_ENABLE_GPU EQUAL 1)
|
||||
message (" WASI-NN: GPU enabled")
|
||||
add_definitions (-DWASI_NN_ENABLE_GPU=1)
|
||||
add_definitions (-DWASM_ENABLE_WASI_NN_GPU=1)
|
||||
endif ()
|
||||
if (WAMR_BUILD_WASI_NN_ENABLE_EXT EQUAL 1)
|
||||
if (WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE EQUAL 1)
|
||||
message (" WASI-NN: External Delegation enabled")
|
||||
add_definitions (-DWASI_NN_ENABLE_EXTERNAL_DELEGATE=1)
|
||||
add_definitions (-DWASM_ENABLE_WASI_NN_EXTERNAL_DELEGATE=1)
|
||||
endif ()
|
||||
if (DEFINED WASI_NN_EXT_DELEGATE_PATH)
|
||||
add_definitions (-DWASI_NN_EXT_DELEGATE_PATH="${WASI_NN_EXT_DELEGATE_PATH}")
|
||||
if (DEFINED WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH)
|
||||
add_definitions (-DWASM_WASI_NN_EXTERNAL_DELEGATE_PATH="${WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH}")
|
||||
endif ()
|
||||
endif ()
|
||||
if (WAMR_BUILD_ALLOC_WITH_USER_DATA EQUAL 1)
|
||||
|
||||
Reference in New Issue
Block a user