Refactor WASI-NN to simplify the support for multiple frameworks (#1834)
- Reorganize the library structure
- Use the latest version of `wasi-nn` wit (Oct 25, 2022):
0f77c48ec1/wasi-nn.wit.md
- Split logic that converts WASM structs to native structs in a separate file
- Simplify addition of new frameworks
This commit is contained in:
@ -5,6 +5,15 @@ set (WASI_NN_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
add_definitions (-DWASM_ENABLE_WASI_NN=1)
|
||||
|
||||
set (LIBC_WASI_NN_SOURCE ${WASI_NN_DIR}/wasi_nn_native.c ${WASI_NN_DIR}/wasi_nn_tensorflow.cpp)
|
||||
include_directories (${WASI_NN_DIR})
|
||||
include_directories (${WASI_NN_DIR}/src)
|
||||
include_directories (${WASI_NN_DIR}/src/utils)
|
||||
|
||||
set (
|
||||
LIBC_WASI_NN_SOURCE
|
||||
${WASI_NN_DIR}/src/wasi_nn.c
|
||||
${WASI_NN_DIR}/src/wasi_nn_tensorflowlite.cpp
|
||||
${WASI_NN_DIR}/src/utils/wasi_nn_app_native.c
|
||||
)
|
||||
|
||||
set (TENSORFLOW_LIB tensorflow-lite)
|
||||
|
||||
Reference in New Issue
Block a user