diff options
author | 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com> | 2019-03-07 12:31:52 +0900 |
---|---|---|
committer | 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com> | 2019-03-07 12:31:51 +0900 |
commit | 8c9caae8f541cb3666a9984f282290a1c776b5a0 (patch) | |
tree | 0d97a9a455b608583068d2a7d6f1a124da900e14 | |
parent | baae7ac53254d357def0973b57b71e55ab225b69 (diff) | |
download | nnfw-8c9caae8f541cb3666a9984f282290a1c776b5a0.tar.gz nnfw-8c9caae8f541cb3666a9984f282290a1c776b5a0.tar.bz2 nnfw-8c9caae8f541cb3666a9984f282290a1c776b5a0.zip |
Always require NEON2SSESource for TFLITE build (#4620)
* Always require NEON2SSESource for TFLITE build
NEON2SSE is a header-only library, and thus there is no need to exclude
it for cross or arm native build.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Check TARGET_ARCH in NEON2SSESource package
-rw-r--r-- | cmake/packages/NEON2SSESourceConfig.cmake | 6 | ||||
-rw-r--r-- | externals/CMakeLists.txt | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/cmake/packages/NEON2SSESourceConfig.cmake b/cmake/packages/NEON2SSESourceConfig.cmake index b656f5700..f39e842a8 100644 --- a/cmake/packages/NEON2SSESourceConfig.cmake +++ b/cmake/packages/NEON2SSESourceConfig.cmake @@ -4,6 +4,12 @@ function(_NEON2SSESource_import) return() endif(NOT DOWNLOAD_NEON2SSE) + # TODO Remove this workaround once target preset is ready + if(NOT (TARGET_ARCH_BASE STREQUAL "x86_64")) + set(NEON2SSESource_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT (TARGET_ARCH_BASE STREQUAL "x86_64")) + nnfw_include(ExternalSourceTools) nnfw_include(OptionTools) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index b51aa45cf..a63c0729b 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -50,11 +50,11 @@ list(APPEND TFLITE_INCLUDES "${TFLITE_DEPEND_DIR}/gemmlowp") list(APPEND TFLITE_INCLUDES "${TFLITE_DEPEND_DIR}/farmhash/src") list(APPEND TFLITE_INCLUDES "${TFLITE_DEPEND_DIR}/flatbuffers/include") -if(BUILD_IS_NATIVE AND NOT HOST_ARCH_BASE STREQUAL "arm") - # Required external sourcefor x86-64 build - nnfw_find_package(NEON2SSESource REQUIRED) - list(APPEND TFLITE_INCLUDES "${TFLITE_DEPEND_DIR}/neon_2_sse") -endif() +nnfw_find_package(NEON2SSESource QUIET) + +if(NEON2SSESource_FOUND) + list(APPEND TFLITE_INCLUDES "${NEON2SSESource_DIR}") +endif(NEON2SSESource_FOUND) # This kernels are not used on nnfw ## spectrogram |