[moco-tf] Clear ConcatV2 Canonicalizer (#6521)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Tue, 13 Aug 2019 07:40:22 +0000 (16:40 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 13 Aug 2019 07:40:22 +0000 (16:40 +0900)
This will erase ConcatV2 Canonicalier implementation to reduce complexcity of diff for migration to using VariadicArityNode

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
compiler/moco-tf/src/Canonicalization/ConcatV2Canonicalizer.cpp

index 2100fe4..e3282f3 100644 (file)
 #include "Dialect/TFNodeVisitor.h"
 #include "Dialect/TFNodeImpl.h"
 
-#include <stdex/Memory.h>
+#include <stdexcept>
 
 namespace
 {
 
 bool canonicalize_concat(loco::Graph *graph, moco::tf::TFConcatV2 *node)
 {
-  /**
-   * @note This will replace TFConcatV2 node with Canonical TensorConcat
-   *
-   *       Before
-   *                 A --- TFConcatV2 -- C
-   *                 B --/
-   *       After
-   *                    +------ TFConcatV2 --
-   *                    |     /
-   *                 B -------
-   *                    |     \
-   *                 A -+------ TensorConcat -- C
-   *
-   *       Where
-   *                 A : lhs of TFConcatV2
-   *                 B : rhs of TFConcatV2
-   *                 C : a node that uses TFConcatV2 as an input
-   *                 TFConcatV2 is disconnected from C
-   */
+  (void)graph;
+  (void)node;
 
-  auto tensorconcat_node = graph->nodes()->create<loco::TensorConcat>();
+  throw std::runtime_error("NYI ConcatV2Canonicalizer");
 
-  // copy attribute(s)
-  tensorconcat_node->axis(node->axis());
-
-  auto node_A = node->lhs();
-  auto node_B = node->rhs();
-
-  // update connections
-  tensorconcat_node->lhs(node_A);
-  tensorconcat_node->rhs(node_B);
-
-  // replace node
-  replace(node).with(tensorconcat_node);
-
-  return true;
+  return false;
 }
 
 } // namespace