From 553a758b434f6c6d2ff27fe6e6fe8973d969ea74 Mon Sep 17 00:00:00 2001 From: icodo98 Date: Mon, 9 Sep 2024 07:52:12 +0900 Subject: [PATCH] [luci/service] fix typo fix typo of annotation and adjust lines withs suggestions. ONE-DCO-1.0-Signed-off-by: JuYoung Lee rsb98759@gmail.com --- compiler/luci/service/src/CircleShapeInferenceHelper.cpp | 1 - compiler/luci/service/src/CircleShapeInferenceHelper.h | 2 +- compiler/luci/service/src/Nodes/CirclePad.cpp | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/luci/service/src/CircleShapeInferenceHelper.cpp b/compiler/luci/service/src/CircleShapeInferenceHelper.cpp index 43a8d9cd5c9..3d78a31a12e 100644 --- a/compiler/luci/service/src/CircleShapeInferenceHelper.cpp +++ b/compiler/luci/service/src/CircleShapeInferenceHelper.cpp @@ -182,7 +182,6 @@ loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::Ci output_shape.rank(input_shape.rank()); auto const_padding = dynamic_cast(paddings); - if (const_padding == nullptr) return output_shape; diff --git a/compiler/luci/service/src/CircleShapeInferenceHelper.h b/compiler/luci/service/src/CircleShapeInferenceHelper.h index a81114b016a..1f99bb5b444 100644 --- a/compiler/luci/service/src/CircleShapeInferenceHelper.h +++ b/compiler/luci/service/src/CircleShapeInferenceHelper.h @@ -49,7 +49,7 @@ loco::TensorShape circle_shape(const luci::CircleNode *node); loco::TensorShape broadcast_shape(const loco::TensorShape &x, const loco::TensorShape &y); // Return shape of pad ops using paddings. -// If paddings is static, return the shape filled with unknown dimensions. +// If paddings is not static, return the shape filled with unknown dimensions. loco::TensorShape pad_shape(const loco::TensorShape &input_shape, const luci::CircleNode *paddings); /** diff --git a/compiler/luci/service/src/Nodes/CirclePad.cpp b/compiler/luci/service/src/Nodes/CirclePad.cpp index 2589de57b20..b16b9b86291 100644 --- a/compiler/luci/service/src/Nodes/CirclePad.cpp +++ b/compiler/luci/service/src/Nodes/CirclePad.cpp @@ -32,11 +32,10 @@ namespace sinf loco::TensorShape Algorithm::visit(const luci::CirclePad *node) { - auto paddings = loco::must_cast(node->paddings()); - auto circle_input = loco::must_cast(node->input()); auto input_shape = circle_shape(circle_input); + return pad_shape(input_shape, paddings); }