-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[NPU] fix elementwise_mul to support broadcast, test=develop #36258
Conversation
Thanks for your contribution! |
|
||
|
||
# TODO(qili93): Paddle enformce not met: | ||
# dimension mismatch at elementwise_op_function.h:240 |
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.
assertRaises can check exception
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.
Fixed by adding axis support.
In paddle 2.0, axis is not supported as parameter in multiply api, while axis is able to set to non -1 in paddle.fluid.layers.elementwise_mul. Fix elementwise_mul_op_npu.cc to support axis = -1. The previous error is caused by input is broadcast case while axis is always set to -1 in 2.0 api.
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
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 for skip_check_grad_ci
PR types
Bug fixes
PR changes
OPs
Describe
Fix elementwise_mul to support broadcast.