[moco-tf] Use logo::Pass for Transform (#7000)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 29 Aug 2019 00:30:02 +0000 (09:30 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 29 Aug 2019 00:30:02 +0000 (09:30 +0900)
This will make moco::tf to use logo::Pass for Transform class as for first step of migration

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
compiler/moco-tf/CMakeLists.txt
compiler/moco-tf/requires.cmake
compiler/moco-tf/src/Transform.h

index 254fb16..6f94702 100644 (file)
@@ -30,6 +30,7 @@ target_link_libraries(moco_tf_frontend PRIVATE pepper_strcast)
 target_link_libraries(moco_tf_frontend PRIVATE locomotiv)
 target_link_libraries(moco_tf_frontend PRIVATE plier_tf)
 target_link_libraries(moco_tf_frontend PRIVATE locoex_customop)
+target_link_libraries(moco_tf_frontend PRIVATE logo)
 
 if(NOT ENABLE_TEST)
   return()
@@ -46,4 +47,5 @@ target_link_libraries(moco_tf_frontend_test moco_tf_frontend)
 target_link_libraries(moco_tf_frontend_test stdex)
 target_link_libraries(moco_tf_frontend_test plier_tf)
 target_link_libraries(moco_tf_frontend_test locoex_customop)
+target_link_libraries(moco_tf_frontend_test logo)
 add_test(moco_tf_frontend_test moco_tf_frontend_test)
index be91c8c..9d091c0 100644 (file)
@@ -7,3 +7,4 @@ require("pepper-strcast")
 require("locomotiv")
 require("plier-tf")
 require("locoex-customop")
+require("logo")
index 2f8b8b3..80cb9f9 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <loco.h>
 
+#include <logo/Pass.h>
+
 #include <string>
 
 namespace moco
@@ -26,22 +28,11 @@ namespace moco
 namespace tf
 {
 
-class Transform
-{
-public:
-  virtual ~Transform() = default;
-
-public:
-  virtual const char *name(void) const { return nullptr; }
-
-public:
-  /**
-   * @brief  Run the transformation
-   *
-   * @return false if there was nothing changed
-   */
-  virtual bool run(loco::Graph *graph) = 0;
-};
+/**
+ * @note  Transform will be replaced by logo::Pass
+ */
+
+using Transform = logo::Pass;
 
 std::string transform_name(const Transform *);