-
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
add assign composite backward op #51430
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.
LGTM
@@ -41,14 +43,16 @@ def test_forward(self): | |||
|
|||
def test_backward(self): | |||
paddle.enable_static() | |||
self.check_grad(['X'], 'Out', check_eager=True) | |||
self.check_grad(['X'], 'Out', check_eager=True, check_prim=True) |
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.
pr标注下原算子缺少bfloat16单测,所以组合算子也没有进行测试
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.
done
template <typename T> | ||
void assign_grad(const Tensor& out_grad, Tensor* x_grad) { | ||
if (x_grad) { | ||
auto res = assign<T>(out_grad); |
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.
it's can use by_pass like subtract_grad
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.
done
PR types
New features
PR changes
Others
Describe
add assign composite backward op
not supporting bfloat16 tests since original op neither supports.