[moco-tf] use mio-tf (#8328)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 21 Oct 2019 04:48:58 +0000 (13:48 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 21 Oct 2019 04:48:58 +0000 (13:48 +0900)
* [moco-tf] use mio-tf

This will let moco-tf to use mio-tf so that one TensorFlow protobuf library produced and used

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

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

index ffd2467..2d75b8d 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")
@@ -19,10 +9,10 @@ list(REMOVE_ITEM SOURCES ${TESTS})
 add_library(moco_tf_frontend SHARED ${SOURCES})
 target_include_directories(moco_tf_frontend PRIVATE src)
 target_include_directories(moco_tf_frontend PUBLIC include)
-target_link_libraries(moco_tf_frontend PUBLIC moco_tf_proto)
 target_link_libraries(moco_tf_frontend PUBLIC loco)
 target_link_libraries(moco_tf_frontend PUBLIC moco_lang)
 target_link_libraries(moco_tf_frontend PUBLIC moco_import)
+target_link_libraries(moco_tf_frontend PUBLIC mio_tf)
 target_link_libraries(moco_tf_frontend PRIVATE bino)
 target_link_libraries(moco_tf_frontend PRIVATE fipe)
 target_link_libraries(moco_tf_frontend PRIVATE locop)
diff --git a/compiler/moco-tf/proto/CMakeLists.txt b/compiler/moco-tf/proto/CMakeLists.txt
deleted file mode 100644 (file)
index 2053a68..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(moco_tf_proto STATIC ${GRAPHDEF_PROTO_SOURCES})
-set_target_properties(moco_tf_proto PROPERTIES POSITION_INDEPENDENT_CODE ON)
-target_include_directories(moco_tf_proto PUBLIC ${GRAPHDEF_PROTO_INCLUDE_DIRS})
-target_link_libraries(moco_tf_proto PUBLIC libprotobuf)
index 44cfec9..9b400ec 100644 (file)
@@ -7,6 +7,7 @@ require("stdex")
 require("moco-log")
 require("pepper-strcast")
 require("locomotiv")
+require("mio-tf")
 require("plier-tf")
 require("locoex-customop")
 require("logo")