Repository navigation
[Fix] [AMD] fp8-moe: Mark the AITER-shuffled per-tensor FP8 MoE weights is_shuffled - #51463
Conversation
…ts is_shuffled Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Grok-2 accuracy/perf jobs dispatched on this branch (
I'll post the results when they finish. |
|
Grok-2 results on this branch (head
On main with this AITER pin, both MI35x jobs fail at server start with For reference, pre-bump scores (AITER |
|
thx you so much BingXu this is the right fix |
…fled per-tensor FP8 MoE weights is_shuffled to release/v1.0.0 (#51463) (#51767) Co-authored-by: Bingxu Chen <[email protected]> Co-authored-by: Claude <[email protected]>
Motivation
Since the AITER bump to
581579ab5(#50759), Grok-2 fails to start on MI35x (gfx950) in the nightlynightly-8-gpu-mi35x-grok2job, on both rocm10 and rocm724:Examples: https://github.com/sgl-project/sglang/actions/runs/44397633600/job/135131701486 (rocm724), https://github.com/sgl-project/sglang/actions/runs/44343550026/job/134939730884 (rocm10). The same job passed on the previous pin (
285579b62), e.g. https://github.com/sgl-project/sglang/actions/runs/43956322127/job/133611713684 (rocm724, 11-16).ROCm/aiter#6736 added a gfx950 check that rejects per-tensor/per-token FP8 MoE weights unless both
w1andw2carryis_shuffled=True.Fp8MoEMethod.process_weights_hip_scale_paddingalready shuffles both weights withshuffle_weight(..., (16, 16)), andshuffle_weighttags its output, but the result is rewrapped in a newtorch.nn.Parameter, which drops the tag. So the layout is right but aiter sees untagged weights. #47870 and #48219 fixed the same gap on the CT FP8 and unquantized MoE paths.Modifications
In the
_use_aiterbranch ofprocess_weights_hip_scale_padding, setis_shuffled = Trueonw13_weightandw2_weightafter the shuffle, the same wayquark_w8a8_fp8_moe.pydoes for its per-tensor FP8 MoE weights. Both callers (FP8 checkpoint and online BF16->FP8 quant) go through this branch.Side effect worth knowing: with the tag set, aiter no longer discards tuned Opus / post-reduce configs for these shapes (
fused_moe.py:4339,:4401), so the kernel choice can change on MI300 too. Those configs expect the shuffled layout these weights already have.Accuracy Tests
Not run yet. Plan:
/rerun-testthe Grok-2 accuracy tests on MI35x (test_grok2_eval_mi35x.py) and MI300 (nightly-8-gpu-grok2).Checklist
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ⊘ Skipped -- add the
run-cilabel to run CI tests.Latest PR Test (Extra): ⊘ Skipped -- add the
run-cilabel to run CI tests.Latest PR Test (AMD ROCm 10): ⊘ Skipped -- add the
run-cilabel to run CI tests.Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: