-
Notifications
You must be signed in to change notification settings - Fork 5.8k
add a fusion op: fused_layernorm_residual_dropout_bias #35151
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 a fusion op: fused_layernorm_residual_dropout_bias #35151
Conversation
Thanks for your contribution! |
87b2723
to
aa27d96
Compare
9c77253
to
bdb5f85
Compare
namespace paddle { | ||
namespace operators { | ||
|
||
namespace cg = cooperative_groups; |
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.
done
if (is_test) { | ||
factor = is_upscale_in_train ? static_cast<T>(1.0f) | ||
: static_cast<T>(1.0f - dropout_prob); | ||
} |
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.
这段忘记替换为GetFactor了
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 加些函数的注释,解释下计算逻辑。 |
LGTM |
…35151) Fused elementwise_add, dropout, elementwise_add and layer_norm into one operator, only support Forward. No Python API changed.
PR types
New features
PR changes
OPs
Describe
Fused elementwise_add, dropout, elementwise_add and layer_norm into one operator, only support Forward