From 3684301514dcc24e2b522adca33dd9ba3aec2c87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 6 Sep 2019 17:57:46 +0900 Subject: [PATCH] [moco-tf] Skip canonical node fix shape (#7244) This will skip canonical nodes fix shapes that is done as loco service - Pull and Push nodes are still called as they exist in import Signed-off-by: SaeHie Park --- compiler/moco-tf/src/Transforms/FixShapeTransform.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp index bbf8c9a..327fb43 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -1733,6 +1733,7 @@ bool FixShapeTransform::run(loco::Graph *graph) for (auto node : loco::active_nodes(loco::output_nodes(graph))) { // clang-format off +// TODO remove this block after Pull, Push is not used in import #define CANONICAL_NODE(TYPE_NAME) \ if (as(node)) \ { \ @@ -1740,7 +1741,8 @@ bool FixShapeTransform::run(loco::Graph *graph) changed = true; \ } \ else -#include "CanonicalNodes.lst" +CANONICAL_NODE(Pull) +CANONICAL_NODE(Push) #undef CANONICAL_NODE #define TENSORFLOW_NODE(OPCODE,CLASS) \ @@ -1761,7 +1763,7 @@ bool FixShapeTransform::run(loco::Graph *graph) } else { - throw std::runtime_error("Not supported loco::Node type in FixShapeTransform"); + // Skip nodes that are not interested } } -- 2.7.4