From: 채성우/On-Device Lab(SR)/Engineer/삼성전자 Date: Fri, 9 Aug 2019 06:06:29 +0000 (+0900) Subject: [loco] support DepthwiseConv2D of TypeForwardAlgorithm (#6404) X-Git-Tag: submit/tizen/20190812.062103~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9335bd8ff9e932de72637d89ff67dee71f972a48;p=platform%2Fcore%2Fml%2Fnnfw.git [loco] support DepthwiseConv2D of TypeForwardAlgorithm (#6404) This commit is to support DepthwiseConv2D and DepthwiseFilterEncode in CanonicalTypeForwardAlgorithm. Signed-off-by: seongwoo --- diff --git a/compiler/loco/src/Service/TypeInference.cpp b/compiler/loco/src/Service/TypeInference.cpp index 3c18cb3..40d77b2 100644 --- a/compiler/loco/src/Service/TypeInference.cpp +++ b/compiler/loco/src/Service/TypeInference.cpp @@ -98,8 +98,11 @@ struct CanonicalTypeForwardAlgorithm final : public loco::CanonicalNodeVisitorinput()); } loco::DataType visit(const loco::ConstGen *node) { return node->dtype(); } loco::DataType visit(const loco::Conv2D *node) { return loco::dtype_get(node->ifm()); } - // TODO Support DepthwiseConv2D - // TODO Support DepthwiseFilterEncode + loco::DataType visit(const loco::DepthwiseConv2D *node) { return loco::dtype_get(node->ifm()); } + loco::DataType visit(const loco::DepthwiseFilterEncode *node) + { + return loco::dtype_get(node->input()); + } loco::DataType visit(const loco::EltwiseAdd *node) { return loco::dtype_get(node->lhs()); } loco::DataType visit(const loco::EltwiseDiv *node) { return loco::dtype_get(node->lhs()); } loco::DataType visit(const loco::EltwiseMul *node) { return loco::dtype_get(node->lhs()); }