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:
@ -96,9 +96,13 @@ if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
|
||||
endif ()
|
||||
|
||||
if (WAMR_BUILD_WASI_NN EQUAL 1)
|
||||
execute_process(COMMAND ${WAMR_ROOT_DIR}/core/deps/install_tensorflow.sh
|
||||
RESULT_VARIABLE TENSORFLOW_RESULT
|
||||
)
|
||||
if (NOT EXISTS "${WAMR_ROOT_DIR}/core/deps/tensorflow-src")
|
||||
execute_process(COMMAND ${WAMR_ROOT_DIR}/core/deps/install_tensorflow.sh
|
||||
RESULT_VARIABLE TENSORFLOW_RESULT
|
||||
)
|
||||
else ()
|
||||
message("Tensorflow is already downloaded.")
|
||||
endif()
|
||||
set(TENSORFLOW_SOURCE_DIR "${WAMR_ROOT_DIR}/core/deps/tensorflow-src")
|
||||
include_directories (${CMAKE_CURRENT_BINARY_DIR}/flatbuffers/include)
|
||||
include_directories (${TENSORFLOW_SOURCE_DIR})
|
||||
|
||||
Reference in New Issue
Block a user