Merged
fix(mega_moe):35-92分核判断分离 #15367
fix(mega_moe):35-92分核判断分离 #15367
Merged
yangzehengAdd on 3 days ago
yangzehengCollaborators
3 days ago

描述

本次重构旨在消除通用 IsSubBlockIdx 判断,将 A5/A6 因 CV 配比不同产生的任务分派收归各自架构控制流,保持原有计算和同步流程。

主要调整:
消除方法分为三类,sub判断直接return的,把判断移出函数体放在各自soc逻辑中。sub判断不同核走不同逻辑的,函数体移入soc各自维护。sub判断逻辑函数较为底层的,迁出函数会造成大量重复代码的,使用宏隔离

  • 将 RunGmm1*、Gmm1Exec* 及 GMM2 对应函数迁入 arch35/stage、arch92/stage,公共层保留底层计算原语。
  • 将 A5 专用的 UpdateMoeExpertGmm1GlobalBuffer、PrepareFinalWaveCombineBuffers 移入 arch35。
  • 将 Dedup、Dispatch 和 Combine 初始化的角色筛选移至架构调用层;GetWaveCombineOwnedRange 通过架构宏隔离实现。
    同时合并 A6 共享专家与路由专家的 GMM1 执行入口,清理无调用函数及冗余分支,最终删除 IsSubBlockIdx。

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for yangzeheng's contribution.)
YyangzehengCollaborators
3 days ago Created pull request, commit 1053c382
YyangzehengCollaborators
3 days ago Modify description of pull request
YyangzehengCollaborators
3 days ago Modify description of pull request
YyangzehengCollaborators
3 days ago Modify description of pull request
yangzehengCollaborators3 days agoStart code review1
mc2/mega_moe/op_host/CMakeLists.txt
Outdated
@@ -46,6 +46,10 @@ else() # 回黄host
4646 set(SUB_MC2_COMPILE TRUE PARENT_SCOPE)
4747endif()
4848 
49+# Shared A5/A6 kernel sources must not be filtered as a hardware architecture directory.
yangzeheng3 days agoComments:

英文注释

likedislike
46 messages are collapsed here。 See more
wang-minboCollaborators
1 day ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
1 day ago Added label: lgtmapproved
CANN-robot
CANN-robotCollaborators
1 day ago Comments:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
YyangzehengCollaborators
1 day ago Resolved final issue
CANN-robotCANN-robotCollaborators
1 day ago Merged pull request