已合并
fboverlap supports swap unperm2 activation #2212
AtomGit-Bot创建于 2025年4月18日
fboverlap supports swap unperm2 activation #2212
已合并
AtomGit-Bot创建于 2025年4月18日
refs/pull/2212/head合入到core_r0.8.0
AtomGit-Bot成员
2025年4月18日
  1. fboverlap supports swap unperm2 activation

unperm2(alltoall后最后一次unperm)中会进行tokens*probs,由于probs需要梯度更新router,tokens激活需要保存至反向,并且tokens是topk后的片上内存占用较高。
这里采用swap的方式节省片上内存,将unperm()中的mul、reducesum操作移到外部,相比原始实现额外引入mul、reducesum、cast(fp32-gating时)以及异步拷贝操作,可能引起性能劣化。

不开permute/unpermute融合时50步对齐。开融合算子后,由于reducesum提到融合算子外部单独调用torchAPI,累加算法与融合算子内不同,无法完全对齐。
输入图片说明

likedislike
Pull Request已成功合入, 合并人@
(感谢 AtomGit-Bot 的贡献)
AAtomGit-Bot
2025年4月18日 添加了   ascend-cla/yes 标签
atlasaccount1atlasaccount1
2025年4月18日 添加了   ci-pipeline-running 标签
AAtomGit-Bot成员
2025年4月18日 更新了说明
atlasaccount1atlasaccount1
2025年4月18日 移除了   ci-pipeline-running 标签
atlasaccount1atlasaccount1
2025年4月18日 添加了   ci-pipeline-failed 标签
此处折叠了52条消息 查看更多
atlasaccount1
atlasaccount1
2025年4月18日 评论:

流水线任务触发成功,正在执行,请稍候。 任务链接[93df960f4182423ea0ed6dedff0eaaf9]

likedislike
atlasaccount1
atlasaccount1
2025年4月18日 评论:

get-log

likedislike
atlasaccount1
atlasaccount1
2025年4月18日 评论:

checklist流水线任务已触发,正在执行,请稍候。任务链接[7f5733c42dff42778508aeac2cf190f2]

likedislike
atlasaccount1
atlasaccount1
2025年4月18日 评论:
检查项 状态 详情
开始运行流水线 >>>
code_check >>>
sca >>>
anti_poison >>>
build >>>
UT >>>
likedislike
JialiZheng
JialiZheng成员
2025年4月21日 评论:

/approve

likedislike