Merged
refactor(distributed): Disable dispatch/combine large-kernel execution version #4262
luoxinhuiAdd on Jun 24
refactor(distributed): Disable dispatch/combine large-kernel execution version #4262
Merged
luoxinhuiAdd on Jun 24
luoxinhui
luoxinhui
Jun 24

描述

移除 MoE dispatch/combine 的 large-kernel 执行版本 C++ 实现,包括 10 个关联 op(MoeDispatch、MoeDistributedCombine、SendToRoutingExpert、SendToSharedExpert、CopyToLocalExpert、FFNSched、FFNBatching、FFNCombineInfo、FFNValidCnt、DispatchSetFlag)及其在框架各模块中的引用。

背景

MoE dispatch/combine 的 large-kernel 执行版本已不更新迭代,该功能后续由 small-kernel 版本替代。需清理所有相关 C++ 代码以减少维护成本,避免歧义。

涉及模块与操作

  1. opcode 枚举 (opcode.h):删除 10 个 opcode 枚举值及分类集合中的引用
  2. opcode 注册 (opcode.cpp):删除 10 个 opcode 的 RegisterInfo
  3. 操作分发 (operation_impl.cpp):删除 10 个 case 分支
  4. 属性定义 (distributed_common.h):删除 MoeDispatchAttr 和 MoeCombineAttr
  5. 函数声明 (distributed_expand.h):删除所有 dispatch/combine 相关声明
  6. codegen 实现 (codegen_distributed.cpp):清空 codegen 逻辑
  7. codegen 映射 (codegen_op_npu.cpp/.h):删除 op 映射和方法声明
  8. 公共 API (tilefwk_op.h):删除 API 声明及 MoeConfig struct
  9. 成本模型 (ISA.h):删除 op 字符串映射
  10. 核心实现文件:删除 moe_dispatch.cpp、moe_distributed_combine.cpp、moe_dispatch.h、moe_combine.h
  11. 测试文件:删除 3 个测试源文件、4 个测试数据文件
  12. Goldens 脚本 (distributed_golden.py):删除 dispatch/combine 相关代码
  13. 文档:删除 4 份用户指南与教程文档

任务目标

备注

本次仅删除 C++ 实现层,当前pypto dispatch&&combine 的详细设计见:python/tests/st/operator/distributed/test_moe_distributed_dispatch_combine.py

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for luoxinhui's contribution.)
luoxinhuiluoxinhui
Jun 24 Created pull request, commit 78980f63
CANN-robotCANN-robotCollaborators
Jun 24 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Jun 24 Comments:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/pypto ✅ codehjp423, 尹杰 (2/2) ✅ codehjp423 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

luoxinhui666, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
luoxinhuiluoxinhui
Jun 24 Pre merge succeeded (commit_id: 5c985c5e0f851ce96154e8bbd9d859216a51aedc)
luoxinhuiluoxinhui
Jun 24 Force-pushed 1 commits:821e6be0-refactor(distributed): Disable dispatch/combine large-kernel execution version
43 messages are collapsed here。 See more
luoxinhuiluoxinhui
Jun 25 Modify description of pull request
luoxinhuiluoxinhui
Jun 25 Modify description of pull request
luoxinhuiluoxinhui
Jun 25 Modify description of pull request
luoxinhuiluoxinhui
Jun 25 Modify description of pull request
luoxinhuiluoxinhui
Jun 25 Modify description of pull request