-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【prim】Maximum grad #51006
【prim】Maximum grad #51006
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
axis只有为-1或者未设置的时候才可以check_eager和check_prim,可以在TestElementwiseOp中写一个函数判断是否有axis并且axis是否为-1来决定check_eager和check_prim的参数,不需要在每个子类中进行一些逻辑的复制重写。
|
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
Tensor* y_grad) { | ||
if (x_grad) { | ||
auto x_tmp = cast<T>(greater_than<T>(x, y), out_grad.dtype()); | ||
auto dx_res = out_grad * x_tmp; |
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.
make sure logic the same with kernel when x equal to y
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.
test x = y in #51568
PR types
Others
PR changes
Others
Describe
Maximum grad composite rule
close broadcast comp test while with no support for axis != 1
check_prim=False in TestElementwiseBF16Op,
cause bfloat16 is not supported in
less_equal