Skip to content

Commit

Permalink
[luci/pass] Revise SubstitutePadV2ToPadPass (#12657)
Browse files Browse the repository at this point in the history
This will revise SubstitutePadV2ToPadPass to support all Ops
that can have ReLU fused activation.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Feb 20, 2024
1 parent 3e47760 commit 90ec098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/luci/pass/src/SubstitutePadV2ToPadPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ bool positive_or_zero(loco::Node *ifm)
// Since Relu.output[i] >= 0
if (dynamic_cast<luci::CircleRelu *>(ifm))
return true;
if (auto conv = dynamic_cast<luci::CircleConv2D *>(ifm))
if (auto node = dynamic_cast<luci::CircleNodeMixin<luci::CircleNodeTrait::FusedActFunc> *>(ifm))
{
if (conv->fusedActivationFunction() == luci::FusedActFunc::RELU)
if (node->fusedActivationFunction() == luci::FusedActFunc::RELU)
return true;
// Add more FusedActFunc
}
Expand Down

0 comments on commit 90ec098

Please sign in to comment.