From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Thu, 5 Sep 2019 05:51:09 +0000 (+0900) Subject: [locoex] Enhance COpTypeInference test (#7204) X-Git-Tag: accepted/tizen/unified/20190911.111615~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50193ac8d03175850dbe3ec608ba64740f0c673b;p=platform%2Fcore%2Fml%2Fnnfw.git [locoex] Enhance COpTypeInference test (#7204) This includes CanonicalTypeInferenceRule check. This is required for future change of loco::TypeInference, which looks into the dtype of all input nodes. So, the type of loco::Pull should be inferred to infer the type of locoex::COpCall. Signed-off-by: Hyun Sik Yoon --- diff --git a/compiler/locoex-customop/src/Service/COpTypeInference.test.cpp b/compiler/locoex-customop/src/Service/COpTypeInference.test.cpp index add3419..97ddd86 100644 --- a/compiler/locoex-customop/src/Service/COpTypeInference.test.cpp +++ b/compiler/locoex-customop/src/Service/COpTypeInference.test.cpp @@ -16,6 +16,10 @@ #include #include +#include + +#include +#include #include @@ -45,9 +49,13 @@ TEST(TypeInferenceRuleTest, COpTypeInference) loco::link(graph_output, push_node); // Run Type Inference - locoex::COpTypeInferenceRule rule; + locoex::COpTypeInferenceRule cop_rule; + loco::CanonicalTypeInferenceRule canon_rule; + loco::MultiDialectTypeInferenceRule rules; + + rules.bind(locoex::COpDialect::get(), &cop_rule).bind(loco::CanonicalDialect::get(), &canon_rule); - loco::apply(&rule).to(g.get()); + loco::apply(&rules).to(g.get()); // Verify! ASSERT_TRUE(loco::dtype_known(call_node));