-
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
Silu double grad #53605
Silu double grad #53605
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
… silu_double_grad
… 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.
LGTM for silu_double_grad, and with TODO:
- change silu_grad、silu_double_grad with more numerical stability decomposite rules.
const Tensor& grad_x_grad, | ||
Tensor* grad_x, | ||
Tensor* grad_out_grad) { | ||
auto exp_neg_x = exp<T>(-x); |
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.
replace e^-x with out in next 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.
done in this 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
@@ -0,0 +1,393 @@ | |||
// 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.
2022 -> 2023
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.
other pr will modify
PR types
Others
PR changes
Others
Description
Pcard-66975
silu, tanh 的静态图二阶compositeOpMaker自动生成在名称上有误,修改成本高,暂时不处理。由于静态图目前可通过flag控制在一阶进行拆解,后续需完善高阶下动静统一的执行路线后修复代码生成问题。
2.将一阶拆解逻辑和二阶拆解逻辑分别在两个文件中实现,以便管理。
3.修复机制,当yaml中无kernel,无invoke,只有composite时的相关解析逻辑
原始yaml 解析逻辑判断如果没有invoke字段则一定需要有kernel字段以生成调用的执行路径(c++ api 或 invoke的其他c++api),此pr新增的op yaml 只具备composite 的执行方式,因此需要适配解析逻辑