From 9335bd8ff9e932de72637d89ff67dee71f972a48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B1=84=EC=84=B1=EC=9A=B0/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 9 Aug 2019 15:06:29 +0900 Subject: [PATCH] [loco] support DepthwiseConv2D of TypeForwardAlgorithm (#6404) This commit is to support DepthwiseConv2D and DepthwiseFilterEncode in CanonicalTypeForwardAlgorithm. Signed-off-by: seongwoo --- compiler/loco/src/Service/TypeInference.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()); } -- 2.7.4