-
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
Add fused elemwise gelu and optimize performance #33480
Add fused elemwise gelu and optimize performance #33480
Conversation
Thanks for your contribution! |
Sorry to inform you that d48d60b's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
d48d60b
to
4ce62de
Compare
Sorry to inform you that 4ce62de's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
4ce62de
to
bfd1f19
Compare
a31c587
to
26bb9a4
Compare
python/paddle/fluid/tests/unittests/test_fused_elemwise_activation_op.py
Show resolved
Hide resolved
static_cast<MT>(0.5) * (static_cast<MT>(1) + tanh_out); | ||
return static_cast<T>(ans); | ||
} | ||
inline HOSTDEVICE T UseOut(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.
UseOut代表什么?加注释?
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.
应该是使用Out来计算梯度,这个目前没有用到。
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 op benchmark ci
PR types
New features
PR changes
OPs
Describe
fused_elemwise_act op在该PR中的主要优化为:
使用tanh(elemwise_add(x, y))作性能测试,测试实验如下:
性能提升总结:
fused_elemwise_act op后续优化TODO: