Skip to content

Commit

Permalink
[luci] Use own shape in the shape inference (#12435)
Browse files Browse the repository at this point in the history
This commit adds a logic where the shape inference of CircleTransposeConv uses a node's own shape when one of inputs is not constant.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Jan 10, 2024
1 parent 6bed623 commit 8b8b396
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/luci/service/src/CircleShapeInferenceRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,9 @@ loco::NodeShape infer_transpose(const luci::CircleTranspose *node)
loco::NodeShape infer_transpose_conv(const luci::CircleTransposeConv *node)
{
// TransposeConv's output shape is written in its 'inputSizes' argument
auto input_sizes_const = loco::must_cast<luci::CircleConst *>(node->inputSizes());
auto input_sizes_const = dynamic_cast<luci::CircleConst *>(node->inputSizes());
if (not input_sizes_const)
return use_own(node);
// TODO support non-const type
LUCI_ASSERT(input_sizes_const->dtype() == loco::DataType::S32, "Only support S32 dtype")
LUCI_ASSERT(input_sizes_const->rank() == 1 && input_sizes_const->dim(0).value() == 4,
Expand Down

0 comments on commit 8b8b396

Please sign in to comment.