You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
Xreki
changed the title
Fix nan for softmax with long softmax_dim.
Fix NaN for softmax with long softmax_dim.
Sep 28, 2023
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
OPs
Description
Pcard-70459
softmax
函数出现NaN #55685 ,softmax长维度分支、前向结果在小输入数据出现NaN问题。KeMatrixSoftmaxForward
代码,主要包括以下几点:BatchSize
模板,外层实际传入的为BlockDim
,Kernel中实际并没有用到,增大了编译负担VecSize
模板,对于每种数据类型,使用的VecSize
是固定的,没有必要为多种VecSize
特化switch
的default
分支添加报错信息;反向添加报错后,log_softmax算子单测会fail,待反向计算问题解决后再添加。