Skip to content

Commit

Permalink
[luci/pass] Revise FuseInstanceNormPass for 3D
Browse files Browse the repository at this point in the history
This will revise FuseInstanceNormPass for 3D to make clone for beta constant.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark committed Dec 2, 2024
1 parent 39c39a3 commit 65a9fe6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/luci/pass/src/FuseInstanceNormPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <luci/Profile/CircleNodeOrigin.h>
#include <luci/Service/CircleNodeClone.h>
#include <luci/Service/Nodes/CircleConst.h>

#include <cassert>
#include <set>
Expand Down Expand Up @@ -730,6 +731,8 @@ template <> bool InstanceNormPattern::match<InstanceNormPattern::PatternVersion:
CHECK_OR_FALSE(
const_as_beta->dim(0).value() == 1 && const_as_beta->dim(1).value() == input_channel &&
(const_as_beta->dim(2).value() == 1 || const_as_beta->dim(2).value() == input_last_dim));
// make clone for shared beta node that gets reshaped in reshape_gamma_beta()
const_as_beta = luci::clone(const_as_beta);

luci::CircleRsqrt *rsqrt_should_be = nullptr;
luci::CircleMean *mean_of_ifm_should_be = nullptr;
Expand Down

0 comments on commit 65a9fe6

Please sign in to comment.