From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Wed, 28 Aug 2019 06:53:36 +0000 (+0900) Subject: [moco-tf] Use loco::NodeShape in copy_shapedata (#6984) X-Git-Tag: accepted/tizen/unified/20190903.052428~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1ba31a9e694d2ec95276dacaf80a8daf0c28c3a;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] Use loco::NodeShape in copy_shapedata (#6984) This will change to use loco::NodeShape if exist as shape information in copy_shapedata() Signed-off-by: SaeHie Park --- diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp index 8a74e92..33f3832 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -108,6 +108,15 @@ bool copy_shapedata(const loco::Node *src, loco::Node *dst) if (dst_shapedata != nullptr) return false; + // if src has loco::NodeShape, use it + if (loco::shape_known(src)) + { + auto shape_data = make_shape_inference_data(loco::shape_get(src)); + dst->annot(std::move(shape_data)); + + return true; + } + // if src doesn't have ShapeInferenceData, skip auto src_shapedata = src->annot(); if (src_shapedata == nullptr)