-
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
[cherry-pick-2.2.1]fix fused_transformer_encoder_layer bug #37229
Merged
lanxianghit
merged 5 commits into
PaddlePaddle:release/2.2
from
zkh2016:release/2.2-cherry-pick-fixbug
Nov 16, 2021
Merged
[cherry-pick-2.2.1]fix fused_transformer_encoder_layer bug #37229
lanxianghit
merged 5 commits into
PaddlePaddle:release/2.2
from
zkh2016:release/2.2-cherry-pick-fixbug
Nov 16, 2021
Conversation
This file contains 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
…addlePaddle#36951) 目前的fused_attention_op不支持attn_mask=None的输入,本PR对此进行了补充,并补充了相应的单测逻辑。
…le#36972) * fix bug: 1. atten: set the default value of attn_dropout_rate to None 2. ffn: add activation parameter
fused_attention_op的实现中,使用了bias_add,且其实现是通过使用kernel primitive来实现的,之后kernel primitive的WriteData api接口及函数内部实现发生了更改,将判断越界的逻辑移到了template的参数中,使得调用的分支有错误,产生了越界赋值操作,污染了别的显存空间的内容。具体表现为:test_fused_attention_op_api.py 单次执行基本上不会报错,多次循环执行不同shape的输入,结果计算不对,具有偶发性,bug不易察觉。
limin2021
previously approved these changes
Nov 16, 2021
xingfeng01
previously approved these changes
Nov 16, 2021
lanxianghit
previously approved these changes
Nov 16, 2021
Add pure fp16 support for fused transformer.
zkh2016
dismissed stale reviews from lanxianghit, xingfeng01, and limin2021
via
November 16, 2021 06:35
2ef56eb
xingfeng01
approved these changes
Nov 16, 2021
TCChenlong
approved these changes
Nov 16, 2021
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
lanxianghit
approved these changes
Nov 16, 2021
zkh2016
changed the title
[cherry-pick-2.2.1]fix fused_transformer_encoder_layer bug
[cherry-pick-2.2.1]fix fused_transformer_encoder_layer bug
Nov 16, 2021
lanxianghit
approved these changes
Nov 16, 2021
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
Bug fixes
PR changes
APIs
Describe
修复了fused_transformer_encoder_layer fine-tune过程发现的一些问题: