[moco-tf] Enable moco to print custom op log (#6114)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Thu, 1 Aug 2019 23:48:19 +0000 (08:48 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 1 Aug 2019 23:48:19 +0000 (08:48 +0900)
By adding `COpNodeSummaryBuilder`, moco can print custom op info.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
compiler/moco-tf/CMakeLists.txt
compiler/moco-tf/requires.cmake
compiler/moco-tf/src/TFFormattedGraph.cpp

index 89fcf88..254fb16 100644 (file)
@@ -29,6 +29,7 @@ target_link_libraries(moco_tf_frontend PRIVATE pepper_str)
 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)
 
 if(NOT ENABLE_TEST)
   return()
@@ -44,4 +45,5 @@ target_link_libraries(moco_tf_frontend_test moco_log)
 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)
 add_test(moco_tf_frontend_test moco_tf_frontend_test)
index 961b5b2..be91c8c 100644 (file)
@@ -6,3 +6,4 @@ require("moco-log")
 require("pepper-strcast")
 require("locomotiv")
 require("plier-tf")
+require("locoex-customop")
index 399c2aa..bfec20a 100644 (file)
@@ -24,6 +24,7 @@
 #include "LogHelper.h"
 
 #include <pepper/str.h>
+#include <locoex/Service/COpFormattedGraph.h>
 
 #include <sstream>
 
@@ -252,6 +253,11 @@ bool MocoNodeSummaryBuilder::build(const loco::Node *node, locop::NodeSummary &s
     return true;
   }
 
+  if (locoex::COpNodeSummaryBuilder(_tbl).build(node, s))
+  {
+    return true;
+  }
+
   return false;
 }