Skip to content

Commit

Permalink
[onert/core] Fix RmsNorm in ShapeValidator
Browse files Browse the repository at this point in the history
Fixes variables to be const in RmsNorm ShapeValidator.

ONE-DCO-1.0-Signed-off-by: Seockho Kim [email protected]
  • Loading branch information
seockho-kim committed Oct 14, 2024
1 parent 5b9eafa commit 0cc8c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/onert/core/src/compiler/ShapeValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1133,9 +1133,9 @@ void ShapeValidator::visit(const ir::operation::RmsNorm &node)
const auto ifm_index{node.getInputs().at(ir::operation::RmsNorm::Input::INPUT)};
const auto gamma_index{node.getInputs().at(ir::operation::RmsNorm::Input::GAMMA)};

auto ifm_shape = operands.at(ifm_index).shape();
auto ofm_shape = operands.at(ofm_index).shape();
auto gamma_shape = operands.at(gamma_index).shape();
const auto &ifm_shape = operands.at(ifm_index).shape();
const auto &ofm_shape = operands.at(ofm_index).shape();
const auto &gamma_shape = operands.at(gamma_index).shape();

OP_REQUIRES(ifm_shape.rank() == 3 || ifm_shape.rank() == 4);
OP_REQUIRES(ifm_shape == ofm_shape);
Expand Down

0 comments on commit 0cc8c01

Please sign in to comment.