From f0f11ee544c0e6ef040b9b42cf072751784c40a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 10 Sep 2019 09:03:46 +0900 Subject: [PATCH] [loco] Do not invoke global shape_known helper (#7297) This commit revises ForwardShapeInferenceAlgorithm to invoke internal "shape_known" helper instead of global shape_known helper. This change reduces the amount of code changes for API v2 migration. Signed-off-by: Jonghyun Park --- compiler/loco/src/Service/CanonicalShapeInferenceRule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/loco/src/Service/CanonicalShapeInferenceRule.cpp b/compiler/loco/src/Service/CanonicalShapeInferenceRule.cpp index 87e6084..5c0f92a 100644 --- a/compiler/loco/src/Service/CanonicalShapeInferenceRule.cpp +++ b/compiler/loco/src/Service/CanonicalShapeInferenceRule.cpp @@ -170,6 +170,7 @@ loco::NodeShape eltwise_binary_node_shape(const loco::Node *node) class ForwardShapeInferenceAlgorithm final : public loco::CanonicalNodeVisitor { private: + bool shape_known(const loco::Node *node) const { return loco::shape_known(node); } loco::NodeShape node_shape(const loco::Node *node) const { return loco::shape_get(node); } public: @@ -384,7 +385,7 @@ public: // CASE: Push loco::NodeShape visit(const loco::Push *node) final { - assert(loco::shape_known(node->from())); + assert(shape_known(node->from())); return node_shape(node->from()); } -- 2.7.4