diff options
author | Per Åstrand <per.astrand@arm.com> | 2020-06-30 10:33:58 +0200 |
---|---|---|
committer | Per Åstrand <per.astrand@arm.com> | 2020-07-02 13:57:39 +0200 |
commit | 94ca3558d648c69ee1b5d7771247763a9fdd9514 (patch) | |
tree | 0de9596e346ff446a214d2798b49cc9972df58ff /tensorflow.cmake | |
parent | 3f6e07ac33c7bd320527e556d8a9fdbd343c1a91 (diff) | |
download | ethos-u-core-software-94ca3558d648c69ee1b5d7771247763a9fdd9514.tar.gz |
MLBEDSW-2059 Add option for accelerator
Add cmake option to select which accelerator backend is to be built for
tensorflow.
Change-Id: Ice06317e1f8b8601f3f077da9d2ef2625b6b2909
Diffstat (limited to 'tensorflow.cmake')
-rw-r--r-- | tensorflow.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow.cmake b/tensorflow.cmake index 312b783..d252252 100644 --- a/tensorflow.cmake +++ b/tensorflow.cmake @@ -35,10 +35,14 @@ set(TFLU_PATH "${TENSORFLOW_PATH}/tensorflow/lite/micro") set(TFLU_GENDIR ${CMAKE_CURRENT_BINARY_DIR}/tensorflow/) set(TFLU_TARGET "lib") set(TFLU_TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR}${CPU_FEATURES}) -set(TFLU_ETHOSU_LIBS $<TARGET_FILE:ethosu_core_driver>) -if(CORE_SOFTWARE_BACKEND STREQUAL NPU) +if(CORE_SOFTWARE_ACCELERATOR STREQUAL NPU) + set(TFLU_ETHOSU_LIBS $<TARGET_FILE:ethosu_core_driver>) + # Set preference for ethos-u over cmsis-nn + list(APPEND TFLU_TAGS "cmsis-nn") list(APPEND TFLU_TAGS "ethos-u") +elseif(CORE_SOFTWARE_ACCELERATOR STREQUAL CMSIS-NN) + list(APPEND TFLU_TAGS "cmsis-nn") endif() string(JOIN TFLU_TAGS " " TFLU_TAGS) |