From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Wed, 28 Aug 2019 07:32:51 +0000 (+0900) Subject: [exo-tflite] ShapeInference support for Custom Op (#6622) X-Git-Tag: accepted/tizen/unified/20190903.052428~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fe000bfc57af4af5d6877f954306758b2e57f2e;p=platform%2Fcore%2Fml%2Fnnfw.git [exo-tflite] ShapeInference support for Custom Op (#6622) * [exo-tflite] ShapeInference support for Custom Op With this commit, ShapeInference can infer the shape of custom op. Signed-off-by: Hyun Sik Yoon * adds an empty line; remove visit() --- diff --git a/compiler/exo-tflite/src/ShapeInference.cpp b/compiler/exo-tflite/src/ShapeInference.cpp index 377dd0d..d71fed9 100644 --- a/compiler/exo-tflite/src/ShapeInference.cpp +++ b/compiler/exo-tflite/src/ShapeInference.cpp @@ -17,16 +17,29 @@ #include "ShapeInference.h" #include +#include #include #include #include +#include + +#include +#include +#include void ShapeInference::run(loco::Graph *g) { // TODO Adjust indentation level { - loco::CanonicalShapeInferenceRule rule; - loco::apply(&rule).to(g); + loco::CanonicalShapeInferenceRule canonical_rule; + locoex::COpShapeInferenceRule cop_rule; + loco::MultiDialectShapeInferenceRule rules; + + rules.bind(loco::CanonicalDialect::get(), &canonical_rule) + .bind(locoex::COpDialect::get(), &cop_rule); + + loco::apply(&rules).to(g); + return; } }