[plier-tf] use mio-tf (#8329)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 21 Oct 2019 03:11:05 +0000 (12:11 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 21 Oct 2019 03:11:05 +0000 (12:11 +0900)
* [plier-tf] use mio-tf

This will let plier-tf to use mio-tf so that one TensorFlow protobuf library is produced

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* check mio_tf cond

* match cmake if endif

compiler/plier-tf/CMakeLists.txt
compiler/plier-tf/proto/CMakeLists.txt [deleted file]
compiler/plier-tf/requires.cmake

index a85538e..b817d13 100644 (file)
@@ -1,16 +1,6 @@
-nnas_find_package(Protobuf QUIET)
-# TensorFlowSource package is used to use ~.proto files
-nnas_find_package(TensorFlowSource EXACT 1.12 QUIET)
-
-if(NOT Protobuf_FOUND)
-  return()
-endif(NOT Protobuf_FOUND)
-
-if(NOT TensorFlowSource_FOUND)
+if(NOT TARGET mio_tf)
   return()
-endif(NOT TensorFlowSource_FOUND)
-
-add_subdirectory(proto)
+endif(NOT TARGET mio_tf)
 
 file(GLOB_RECURSE SOURCES "src/*.cpp")
 file(GLOB_RECURSE TESTS "src/*.test.cpp")
@@ -22,7 +12,7 @@ target_include_directories(plier_tf PUBLIC include)
 
 target_link_libraries(plier_tf PUBLIC angkor)
 target_link_libraries(plier_tf PUBLIC loco)
-target_link_libraries(plier_tf PUBLIC plier_tf_proto)
+target_link_libraries(plier_tf PUBLIC mio_tf)
 
 # Apply global configurations (e.g. warnings as error)
 target_link_libraries(plier_tf PRIVATE nncc_common)
diff --git a/compiler/plier-tf/proto/CMakeLists.txt b/compiler/plier-tf/proto/CMakeLists.txt
deleted file mode 100644 (file)
index 30d99fd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Minimal Protocol Buffer specification for GraphDef file (.pb) encoding/decoding
-unset(PROTO_FILES)
-list(APPEND PROTO_FILES tensorflow/core/framework/versions.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/resource_handle.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/types.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/tensor.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/tensor_shape.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/attr_value.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/op_def.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/node_def.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/function.proto)
-list(APPEND PROTO_FILES tensorflow/core/framework/graph.proto)
-
-Protobuf_Generate(GRAPHDEF_PROTO
-                  "${CMAKE_CURRENT_BINARY_DIR}/generated"
-                  "${TensorFlowSource_DIR}"
-                  ${PROTO_FILES})
-
-add_library(plier_tf_proto STATIC ${GRAPHDEF_PROTO_SOURCES})
-set_target_properties(plier_tf_proto PROPERTIES POSITION_INDEPENDENT_CODE ON)
-target_include_directories(plier_tf_proto PUBLIC ${GRAPHDEF_PROTO_INCLUDE_DIRS})
-target_link_libraries(plier_tf_proto PUBLIC libprotobuf)
index 5f3ce2f..ebf09bc 100644 (file)
@@ -1,2 +1,3 @@
 require("angkor")
 require("loco")
+require("mio-tf")