[https://nvbugs/6402048][fix] Mirror MXFP4's pattern in MXFP8CutlassFusedMoEMethod — round… - #15846
[https://nvbugs/6402048][fix] Mirror MXFP4's pattern in MXFP8CutlassFusedMoEMethod — round…#15846trtllm-agent wants to merge 2 commits into
Conversation
…ate for TP
`MXFP8CutlassFusedMoEMethod.create_weights` asserted
`intermediate_size_per_partition % 128 == 0`, which fails whenever
`moe_tp_size > 1` shards a non-128-aligned intermediate axis (e.g.
Qwen1.5-MoE-A2.7B: intermediate_size=1408 with TTP moe_tp_size=4 gives
352, breaking the UE8M0 int32 SF packing constraint).
Mirror the auto-padding pattern already used by
`MXFP4WeightFusedMoEMethod` (create_weights + pad-before-shard in
load_expert_w{3_w1,2}_weight): round `intermediate_size_per_partition`
up to the 128 weight_alignment (with lcm(weight_alignment, tp_size,
scaling_vector_size) via `_get_weight_alignment`), pad the source
weight and scale tensors before sharding, and allocate storage for the
padded shape. Padded rows/columns are zeros so their reduce-scatter/
all-reduce contribution to the final output is zero, preserving the
reference computation on unpadded slots.
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
7ed4a7c to
154e60f
Compare
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughMXFP8 Cutlass fused-MoE weight and scale-factor loading now pads the intermediate-size axis to a computed alignment before buffer allocation and before sharding checkpoint tensors, affecting ChangesMXFP8 padding alignment
Test waiver cleanup
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Superseded by #15865, which takes a test-skip route (adding |
Summary
Test plan
Links
Summary by CodeRabbit
Bug Fixes
Tests