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 82e4496
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 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 @@ -741,6 +742,9 @@ template <> bool InstanceNormPattern::match<InstanceNormPattern::PatternVersion:
CHECK_OR_FALSE(rsqrt == rsqrt_should_be);
CHECK_OR_FALSE(mean_of_ifm == mean_of_ifm_should_be);

// make clone for shared beta node that gets reshaped in reshape_gamma_beta()
const_as_beta = luci::clone(const_as_beta);

// mul_gamma is absent
// const_as_gamma assume to be 1.0
auto graph = add_as_terminal->graph();
Expand Down

0 comments on commit 82e4496

Please sign in to comment.