Skip to content

Commit

Permalink
[luci/service] Replace shape_get to circle_shape function
Browse files Browse the repository at this point in the history
This commit replaces shape_get to circle_shape function.

ONE-DCO-1.0-Signed-off-by: Chansu Park <1265pcs@gmail.com>
  • Loading branch information
pcs1265 committed Sep 8, 2024
1 parent ea8d0d9 commit 52a2f8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions compiler/luci/service/src/Nodes/CircleConv2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ loco::TensorShape Algorithm::visit(const luci::CircleConv2D *node)
{
LOGGER(l);

auto ifm_shape = luci::shape_get(node->input()).as<loco::TensorShape>(); // in NHWC
auto ker_shape = luci::shape_get(node->filter()).as<loco::TensorShape>(); // in OHWI
auto ifm = loco::must_cast<luci::CircleNode *>(node->input());
auto ifm_shape = circle_shape(ifm); // in NHWC
auto ker = loco::must_cast<luci::CircleNode *>(node->filter());
auto ker_shape = circle_shape(ker); // in OHWI

assert(ifm_shape.rank() == 4);
assert(ker_shape.rank() == 4);
Expand Down
7 changes: 5 additions & 2 deletions compiler/luci/service/src/Nodes/CircleDepthwiseConv2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ namespace sinf

loco::TensorShape Algorithm::visit(const luci::CircleDepthwiseConv2D *node)
{
auto ifm_shape = luci::shape_get(node->input()).as<loco::TensorShape>(); // in NHWC
auto ker_shape = luci::shape_get(node->filter()).as<loco::TensorShape>(); // in 1 H W CM
auto ifm = loco::must_cast<luci::CircleNode *>(node->input());
auto ifm_shape = circle_shape(ifm); // in NHWC
auto ker = loco::must_cast<luci::CircleNode *>(node->filter());
auto ker_shape = circle_shape(ker); // in 1 H W CM


assert(ifm_shape.rank() == 4);
assert(ker_shape.rank() == 4);
Expand Down

0 comments on commit 52a2f8a

Please sign in to comment.