Skip to content

Commit

Permalink
[luci/pass] Adjust input channel for 3D InstNorm (#14388)
Browse files Browse the repository at this point in the history
This will adjust input channel as second dimension for 3D Instance Norm,
in FuseInstanceNormPass.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Dec 2, 2024
1 parent 3a751b3 commit 438fbe8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/luci/pass/src/FuseInstanceNormPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,11 @@ uint32_t PostFusion::input_channel(void)
if (input_rank < 1)
return 0;

if (input_rank == 3)
{
// use dim 1
return input->dim(1).value();
}
// assume channel-last
return input->dim(input_rank - 1).value();
}
Expand Down

0 comments on commit 438fbe8

Please sign in to comment.