Skip to content

Commit

Permalink
[luci/pass] Relax assert in ForwardTransposeOpPass (#14316)
Browse files Browse the repository at this point in the history
This relaxes assert condition in ForwardTransposeOpPass.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <hj1.jeong@samsung.com>
  • Loading branch information
jinevening authored Nov 19, 2024
1 parent a41197d commit 6525628
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/luci/pass/src/ForwardTransposeOpPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ bool has_single_element(const luci::CircleConst *node)
}

if (has_single_elem)
assert(node->rank() == 0 or node->rank() == 1); // FIX_ME_UNLESS
{
for (uint32_t i = 0; i < node->rank(); i++)
assert(node->dim(i).value() == 1); // FIX_ME_UNLESS
}

return has_single_elem;
}
Expand Down

0 comments on commit 6525628

Please sign in to comment.