-
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] Add exp_double_grad, log_double_grad, abs_triple_grad, min_grad #63245
[Prim] Add exp_double_grad, log_double_grad, abs_triple_grad, min_grad #63245
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -25,4 +25,7 @@ | |||
|
|||
vjp_interface_black_list = [ | |||
'silu_grad', | |||
'exp_grad', | |||
'log_grad', | |||
'abs_double_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.
why here?
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.
不加这个编译的时候会报错,好像是Paddle/build/paddle/fluid/pir/dialect/operator/ir/pd_op_vjp.cc文件里,然后报错信息是:primitive 下没有 XXX_grad_jvp
,所以我仿照silu_double_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.
why here?
如果K阶反向只有组合实现,那么需要把K-1阶的算子名称添加到这个列表里,所以我删除了log_grad
,保留了exp_grad
和abs_double_grad
@@ -0,0 +1,71 @@ | |||
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. |
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.
2024
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.
已更新
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 YAML
PaddlePaddle#63245) * add min_grad composite * support exp_double_grad, abs_triple_grad, log_double_grad composite OPs * add infermeta items * set_prim_all for TestLogDoubleGradCheck * change 2022 to 2024 in copyright header * remove 'log_grad' from vjp_interface_black_list
PaddlePaddle#63245) * add min_grad composite * support exp_double_grad, abs_triple_grad, log_double_grad composite OPs * add infermeta items * set_prim_all for TestLogDoubleGradCheck * change 2022 to 2024 in copyright header * remove 'log_grad' from vjp_interface_black_list
PR Category
Operator Mechanism
PR Types
New features
Description
Pcard-75624
exp_double_grad
,log_double_grad
,abs_triple_grad
,min_grad
, and addexp_double_grad
,log_double_grad
,abs_triple_grad
toprim_white_list
.silu_double_grad
Test
exp_double_grad
,log_double_grad
,abs_triple_grad
,min_grad
with pytorch(eps=1e-8):