From 3db746f36987fff04f9572a3f0c61880794d88f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 10 Jan 2019 10:05:01 +0900 Subject: [PATCH] Remove deprecated TensorFlowLite package (#2786) Let's use versioned package instead. Signed-off-by: Jonghyun Park --- cmake/packages/TensorFlowLite/CMakeLists.txt | 37 ----------------- cmake/packages/TensorFlowLiteConfig.cmake | 52 ------------------------ cmake/packages/TensorFlowLiteConfigVersion.cmake | 10 ----- 3 files changed, 99 deletions(-) delete mode 100644 cmake/packages/TensorFlowLite/CMakeLists.txt delete mode 100644 cmake/packages/TensorFlowLiteConfig.cmake delete mode 100644 cmake/packages/TensorFlowLiteConfigVersion.cmake diff --git a/cmake/packages/TensorFlowLite/CMakeLists.txt b/cmake/packages/TensorFlowLite/CMakeLists.txt deleted file mode 100644 index 0a7f62d..0000000 --- a/cmake/packages/TensorFlowLite/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE The followings SHOULD be defined before using this CMakeLists.txt -# -# 'TensorFlowSource_DIR' variable -# 'eigen' target -# 'gemmlowp' target -# 'neon2sse' target -# 'farmhash' target -# 'flatbuffers' target -# -set(TensorFlowLiteSource_DIR ${TensorFlowSource_DIR}/tensorflow/contrib/lite) - -file(GLOB CORE_SRCS "${TensorFlowLiteSource_DIR}/*.c" "${TensorFlowLiteSource_DIR}/*.cc") -file(GLOB CORE_TESTS "${TensorFlowLiteSource_DIR}/*test*.cc") -list(REMOVE_ITEM CORE_SRCS ${CORE_TESTS}) - -file(GLOB_RECURSE KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/*.cc") -file(GLOB_RECURSE KERNEL_TESTS "${TensorFlowLiteSource_DIR}/kernels/*test*.cc") -list(REMOVE_ITEM KERNEL_SRCS ${KERNEL_TESTS}) -# Exclude buggy kernel(s) from the build -list(REMOVE_ITEM KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/internal/spectrogram.cc") - -list(APPEND SRCS ${CORE_SRCS}) -list(APPEND SRCS ${KERNEL_SRCS}) - -include(CheckCXXCompilerFlag) - -CHECK_CXX_COMPILER_FLAG(-Wno-extern-c-compat COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING) - -add_library(tensorflowlite ${SRCS}) -set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON) -target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR}) -target_compile_options(tensorflowlite PUBLIC -Wno-ignored-attributes) -if(COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING) - target_compile_options(tensorflowlite PUBLIC -Wno-extern-c-compat) -endif(COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING) -target_compile_definitions(tensorflowlite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK") -target_link_libraries(tensorflowlite eigen gemmlowp neon2sse farmhash flatbuffers dl) diff --git a/cmake/packages/TensorFlowLiteConfig.cmake b/cmake/packages/TensorFlowLiteConfig.cmake deleted file mode 100644 index 1f737b0..0000000 --- a/cmake/packages/TensorFlowLiteConfig.cmake +++ /dev/null @@ -1,52 +0,0 @@ -function(_TensorFlowLite_import) - nncc_find_package(TensorFlowSource QUIET EXACT 1.7) - - if(NOT TensorFlowSource_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT TensorFlowSource_FOUND) - - nncc_find_package(FlatBuffers QUIET) - - if(NOT FlatBuffers_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT FlatBuffers_FOUND) - - nncc_find_package(Farmhash QUIET) - - if(NOT Farmhash_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT Farmhash_FOUND) - - nncc_find_package(Eigen QUIET) - - if(NOT Eigen_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT Eigen_FOUND) - - nncc_find_package(GEMMLowp QUIET) - - if(NOT GEMMLowp_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT GEMMLowp_FOUND) - - nncc_find_package(NEON2SSE QUIET) - - if(NOT NEON2SSE_FOUND) - set(TensorFlowLite_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT NEON2SSE_FOUND) - - if(NOT TARGET tensorflowlite) - nncc_include(ExternalProjectTools) - add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite) - endif(NOT TARGET tensorflowlite) - - set(TensorFlowLite_FOUND TRUE PARENT_SCOPE) -endfunction(_TensorFlowLite_import) - -_TensorFlowLite_import() diff --git a/cmake/packages/TensorFlowLiteConfigVersion.cmake b/cmake/packages/TensorFlowLiteConfigVersion.cmake deleted file mode 100644 index 5940f59..0000000 --- a/cmake/packages/TensorFlowLiteConfigVersion.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# NOTE The general package will be enabled only when VERSION option is not specified. -set(PACKAGE_VERSION "") -set(PACKAGE_VERSION_EXACT FALSE) -set(PACKAGE_VERSION_COMPATIBLE FALSE) -set(PACKAGE_VERSION_UNSUITABLE TRUE) - -if (PACKAGE_FIND_VERSION STREQUAL "") - set(PACKAGE_VERSION_EXACT TRUE) - set(PACKAGE_VERSION_UNSUITABLE FALSE) -endif(PACKAGE_FIND_VERSION STREQUAL "") -- 2.7.4