Skip to content
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

fix fast_ln backward #8719

Merged
merged 1 commit into from
Jul 5, 2024
Merged

fix fast_ln backward #8719

merged 1 commit into from
Jul 5, 2024

Conversation

deepllz
Copy link
Contributor

@deepllz deepllz commented Jul 5, 2024

PR types

Bug fixes

PR changes

Others

Description

修复fast_ln反向算子的bug,保证结果诸位对齐。
原来的写法:在循环中判断is_rmsnorm,然后计算梯度,这种会导致nvcc编译的汇编代码不同,进而导致cuda算子计算精度问题。修复之后循环内保持和原来逻辑相同,通过在循环外设置mdy_local=0.f来支持rms_norm的反向计算。

Copy link

paddle-bot bot commented Jul 5, 2024

Thanks for your contribution!

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.73%. Comparing base (70564ba) to head (5126539).
Report is 217 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8719      +/-   ##
===========================================
- Coverage    55.73%   55.73%   -0.01%     
===========================================
  Files          623      623              
  Lines        97459    97464       +5     
===========================================
+ Hits         54323    54324       +1     
- Misses       43136    43140       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZHUI ZHUI merged commit bdd2287 into PaddlePaddle:develop Jul 5, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants