[locop] Add TensorReduce visit function (#7597)
author남궁석/On-Device Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Thu, 19 Sep 2019 06:05:55 +0000 (15:05 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 19 Sep 2019 06:05:55 +0000 (15:05 +0900)
* [locop] Add TensorReduce visit function

This commit will add `TensorReduce` visit function

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
* apply comments

* fix mistake

compiler/locop/src/CanonicalNodeSummaryBuilder.cpp

index 2c135c8..b962f49 100644 (file)
@@ -217,6 +217,19 @@ public:
     return res;
   }
 
+  NodeDesc visit(const loco::TensorReduce *node) final
+  {
+    NodeDesc res{opname(node)};
+
+    // TODO Print TensorAxisSet
+    res.arg("input", nodename(node->input()));
+    res.arg("func", pp::fmt((int32_t)node->func()));
+
+    res.state(NodeDesc::State::PartiallyKnown);
+
+    return res;
+  }
+
   NodeDesc visit(const loco::Reshape<loco::ReshapeType::Fixed> *node) final
   {
     NodeDesc res{opname(node)};