Repository navigation
fix(megamoe): align MXFP8 shared SwiGLU backward with PanGu - #5
Merged
davidhe91 merged 1 commit intoDec 2, 2026
Conversation
forever-moe
force-pushed
the
shared-experts-swiglu-quant
branch
from
December 2, 2026 03:17
601f11f to
4efd129
Compare
Use the grouped dual-axis worker for the unclamped shared SwiGLU gradient. Match PanGu's multiplication order before MXFP8 quantization to restore bitwise agreement for dX and shared dW1. Preserve the existing PanGu replay defaults and add explicit 4K SwiGLU and Stream-K regressions to the same entry. Keep the CANN extension in the standalone replay and exercise EP2 scheduling, empty ranks, and tiling recovery through the existing test launcher.
forever-moe
force-pushed
the
shared-experts-swiglu-quant
branch
from
December 2, 2026 03:25
4efd129 to
38348ae
Compare
davidhe91
approved these changes
Dec 2, 2026
davidhe91
merged commit Dec 2, 2026
b53766c
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.
/kind bug
Summary
修复 Ascend 950 MXFP8 融合共享专家的 SwiGLU 反向量化与 PanGu Native 的逐 bit 差异。原实现对无 clamp 的共享专家选择 dense worker。PanGu Native 使用
SwigluBackwardGroupQuantWithDualAxis(group_index=None)。两个实现的 FP32 乘法顺序不同,舍入差异会进入dU的 FP8 数据,并传到消费 row 数据的dX和消费 col 数据的共享dW1。共享专家的任务描述符改用已有的 grouped 双轴 worker。无 clamp 和带 clamp 分别选取其对应特化。修复可复用现有 native 制品和 descriptor ABI。
将触发问题的 4K 形状收进现有 PanGu 单卡回放,覆盖无梯度前向、训练前向和梯度。EP2 Stream-K 用例也切换到 PanGu 的 grouped 参考。
Evidence
dX有 4,740 个不同字节,共享dW1有 32,017 个不同字节。使用同一份 native 制品切换到 grouped 后,融合对拆分、融合对全 Native、拆分对全 Native 均通过 8/8 项逐 bit 对照。收编后的用例临时恢复旧 selector 时,仍能检出这两处差异。本地设备验证使用 CANN 9.2.0。集群 CANN 9.2.2 的 64P 原训练作业仍待复验。
Merge Danger
改动范围为 Ascend 950 MXFP8 共享专家的 SwiGLU 反向量化与对应回放。可通过回退本 PR 的单个提交恢复原行为。