Repository navigation
perf(megamoe): add opt-in dual-QP and paired-peer UDMA transfers - #3
Merged
davidhe91 merged 3 commits intoDec 1, 2026
Conversation
davidhe91
approved these changes
Dec 1, 2026
dz-ssk
marked this pull request as ready for review
December 1, 2026 10:44
davidhe91
merged commit Dec 1, 2026
60ab90b
into
davidhe91:megamoe-ascend950-integration
1 check failed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
为 Ascend950 MegaMoE 增加可选的双 QP 与成对 peer PUT 传输,减少单队列串行提交和等待。基于
megamoe-ascend950-integration,沿用分支已有的共享专家与 Host 优化。实现
MegaMoeTuningOptions(udma_dual_qp=True):远端 token GET/PUT 在 QP0、QP1 之间按约 3:1 分条,分界按 512 B 对齐;支持尾块与大消息分批。pair_peer_puts=True:只配对同一 FIFO owner、相同就绪条件和 tile 的两个不同 peer PUT,先提交两者再逐 QP 等待。保留全部原始任务与完成计数,空任务同样发布信用。HYPER_MULTICORE_SHMEM_UDMA_QP_NUM(默认1,支持1/2/4)及配置诊断;Ascend950 私有 SHMEM SDK 启用 multi-link、关闭 relay。需要重建原生制品。使用
在所有 rank 首次初始化 SHMEM 前设置:
验证与限制
python -m pytest -q tests/ut/modules/mega_moe tests/ut/shmem:392 passed。包括 EP64 全部 rank 的前/反向配对、EP4/128、空片/尾片、概率路径,以及实际双 QP 传输模板的 CPU 记录回放。python tests/ut/build/check_build.py:24 passed;python scripts/check_repository.py通过;修改文档 Markdownlint 通过。module.py两处告警;Lizard 对既有构造函数、传输入口仍有复杂度告警。保持草稿,待此集成分支完成 NPU 数值、跨 rank 完成协议、重计算/反向及性能对照后再转为可合入状态。历史实验使用不同的共享专家实现,其收益不作为本提交的性能结论。