Move scripts related with tflite_benchmark_model (#4770)
author박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 18 Mar 2019 08:14:40 +0000 (17:14 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 18 Mar 2019 08:14:40 +0000 (17:14 +0900)
This commit extracts scripts related with tflite_benchmark_model
from "externals/CMakeLists.txt", and move these scripts into
tflite_benchmark_model project.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
externals/CMakeLists.txt
tests/tools/tflite_benchmark_model/CMakeLists.txt

index b0ac9de..cb4073f 100644 (file)
@@ -4,10 +4,6 @@ if(NOT TensorFlowLite_FOUND)
   return()
 endif(NOT TensorFlowLite_FOUND)
 
-if(BUILD_TFLITE_BENCHMARK_MODEL)
-  target_compile_definitions(tensorflow-lite PUBLIC "TFLITE_PROFILING_ENABLED")
-endif()
-
 if("${TARGET_OS}" STREQUAL "android")
   if(NOT DEFINED NDK_DIR)
     file(GLOB NDK_DIRS "${CMAKE_SOURCE_DIR}/tools/cross/ndk/*")
index c48f658..7e0e9d8 100644 (file)
@@ -2,6 +2,12 @@ if (NOT BUILD_TFLITE_BENCHMARK_MODEL)
   return()
 endif(NOT BUILD_TFLITE_BENCHMARK_MODEL)
 
+nnfw_find_package(TensorFlowLite REQUIRED)
+
+# TODO Remove this target_compile_definitions command, and just check its presence.
+#      This change is prerequisites on pre-built tensorflow-lite package support
+target_compile_definitions(tensorflow-lite PUBLIC "TFLITE_PROFILING_ENABLED")
+
 file(GLOB_RECURSE SOURCES "*.cc")
 
 nnfw_find_package(TensorFlowSource REQUIRED)