docs: record sm90 megamoe phase2 dev log
This commit is contained in:
@@ -42,3 +42,36 @@
|
||||
- 后续待办:
|
||||
- 在线性历史中继续提交 Phase 2 dispatch-only 实现。
|
||||
- Phase 3 开始实现 L1 TMA + 单 tile WGMMA,并增加 accumulator/reference 对比。
|
||||
|
||||
## 2026-06-18 00:00:45 CST
|
||||
|
||||
- 对应 clean 工作 commit:`540e5aeadc1b21dca8222a838ed6e5b6c4de93e8`
|
||||
- 用户请求摘要:在线性 Phase 1 commit 之后提交 Phase 2 dispatch-only 实现,并重新通过远端 single-rank、2-rank、8-rank correctness 测试。
|
||||
- 本次提交的核心改动:
|
||||
- 将 SM90 kernel 从 Phase 1 空 kernel 扩展为 Phase 2 dispatch-only kernel。
|
||||
- 实现 dispatch workspace 清理、expert count、source token-topk index 写入、NVLink barrier、remote/local token/SF/top-k weight pull、token source metadata 写入、`l1_arrival_count` release。
|
||||
- 扩展 SM90 symmetric buffer views,额外暴露 `l1_topk_weights`、`expert_recv_count_sum`、`l1_arrival_count`、`token_src_metadata` 供 Phase 2 correctness 检查。
|
||||
- 更新 Python `SymmBuffer`,SM90 分支解包 12 个 views,SM100 分支保持 8 个 views。
|
||||
- 新增 Phase 2 correctness 脚本 `megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py`,使用 torchrun-compatible distributed init。
|
||||
- 关键文件列表:
|
||||
- `csrc/apis/sm90_mega.hpp`
|
||||
- `deep_gemm/mega/__init__.py`
|
||||
- `deep_gemm/include/deep_gemm/impls/sm90_fp8_mega_moe.cuh`
|
||||
- `megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py`
|
||||
- 详细开发流程:
|
||||
- 在 Phase 1 commit 和 Phase 1 日志 commit 之后,从原 dispatch-only 实现恢复 Phase 2 相关文件,保证历史顺序为 Phase 1 -> Phase 1 log -> Phase 2。
|
||||
- 本地静态检查:`python3 -m py_compile megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py`、`git diff --check`。
|
||||
- 远端同步:`rsync -avR csrc/apis/sm90_mega.hpp deep_gemm/mega/__init__.py deep_gemm/include/deep_gemm/impls/sm90_fp8_mega_moe.cuh megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py g0034:/mnt/beegfs/lxy/DeepGEMM/`。
|
||||
- 远端 build:`ssh g0034 "docker exec sglang-lxy bash -lc 'cd /mnt/beegfs/lxy/DeepGEMM && timeout 60s bash develop.sh'"`,通过。
|
||||
- 远端 single-rank correctness:`ssh g0034 "docker exec sglang-lxy bash -lc 'cd /mnt/beegfs/lxy/DeepGEMM && timeout 60s python3 megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py --tokens-list 0,8,48,192'"`,通过。
|
||||
- 远端 2-rank correctness:`ssh g0034 "docker exec sglang-lxy bash -lc 'cd /mnt/beegfs/lxy/DeepGEMM && CUDA_VISIBLE_DEVICES=0,1 timeout 60s torchrun --standalone --nproc_per_node=2 megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py --tokens-list 0,8,48,192'"`,通过。
|
||||
- 远端 8-rank correctness:`ssh g0034 "docker exec sglang-lxy bash -lc 'cd /mnt/beegfs/lxy/DeepGEMM && CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 timeout 60s torchrun --standalone --nproc_per_node=8 megamoe_dev_test_scripts/phase2/dispatch_only_correctness.py --tokens-list 0,8,48,192'"`,通过。
|
||||
- 确认远端无残留 `dispatch_only_correctness` / `interface_smoke` / `torchrun` 进程。
|
||||
- 测试结果和已知问题:
|
||||
- Phase 2 build 通过。
|
||||
- Phase 2 dispatch-only correctness 在 single-rank、2-rank、8-rank 下通过。
|
||||
- 覆盖 `num_tokens=0,8,48,192`,并覆盖 `BLOCK_M=32/64/128`。
|
||||
- single-rank 仍出现 PyTorch symmetric memory warning:`cuMulticastCreate failed with: "invalid argument"`,当前不影响 correctness。
|
||||
- 后续待办:
|
||||
- Phase 3:在 Phase 2 dispatch 产物上实现 L1 TMA + 单 tile WGMMA。
|
||||
- 为 Phase 3 增加 accumulator / scaled GEMM reference 对比测试。
|
||||
|
||||
Reference in New Issue
Block a user