Add fused elemwise gelu and optimize performance#33480
Merged
wangxicoding merged 4 commits intoPaddlePaddle:developfrom Jul 5, 2021
Merged
Add fused elemwise gelu and optimize performance#33480wangxicoding merged 4 commits intoPaddlePaddle:developfrom
wangxicoding merged 4 commits intoPaddlePaddle:developfrom
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
gongweibao
reviewed
Jul 1, 2021
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) { |
Contributor
Author
There was a problem hiding this comment.
应该是使用Out来计算梯度,这个目前没有用到。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
OPs
Describe
fused_elemwise_act op在该PR中的主要优化为:
使用tanh(elemwise_add(x, y))作性能测试,测试实验如下:
性能提升总结:
fused_elemwise_act op后续优化TODO: