-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onert/core] Fix ShapeValidator of RmsNorm #14217
[onert/core] Fix ShapeValidator of RmsNorm #14217
Conversation
This commit fixes ShapeValidator of RmsNorm to allow rank 3 input and single gamma. ONE-DCO-1.0-Signed-off-by: Seockho Kim [email protected]
auto ifm_shape = operands.at(ifm_index).shape(); | ||
auto ofm_shape = operands.at(ofm_index).shape(); | ||
auto gamma_shape = operands.at(gamma_index).shape(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional) How about adding const reference
?
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional) How about adding
const reference
?
Okay, I'll update it :)
auto ofm_shape = operands.at(ofm_index).shape(); | ||
auto gamma_shape = operands.at(gamma_index).shape(); | ||
|
||
OP_REQUIRES(ifm_shape.rank() == 3 || ifm_shape.rank() == 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK the background, Is there a reason to support input with rank==3
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK the background, Is there a reason to support input with
rank==3
?
Current testing model has "rank = 3" inputs, like A x B x C.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes variables to be const in RmsNorm ShapeValidator. ONE-DCO-1.0-Signed-off-by: Seockho Kim [email protected]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit fixes ShapeValidator of RmsNorm to allow rank 3 input and single gamma.
ONE-DCO-1.0-Signed-off-by: Seockho Kim [email protected]
issue: #14089
draft: #14088