Repository navigation
Conversation
Signed-off-by: charlesxu91 <charlesxu.mi@gmail.com>
CharlesXu-HQ
force-pushed
the
perf/mxfp8-batch-invariant-permute-quantization
branch
from
September 26, 2026 07:54
677853a to
94dfdf0
Compare
CharlesXu-HQ
marked this pull request as ready for review
September 26, 2026 07:58
wdykas
reviewed
Sep 29, 2026
Contributor
|
thanks for contributing! left a small comment but looks good overall. |
santhnm2
approved these changes
Sep 29, 2026
yaoyu-33
approved these changes
Sep 29, 2026
Signed-off-by: charlesxu91 <charlesxu.mi@gmail.com>
wdykas
enabled auto-merge
October 3, 2026 12:35
wdykas
approved these changes
Oct 3, 2026
kvareddy
approved these changes
Oct 3, 2026
Contributor
|
/ok to test 213b1b8 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/37327446671 |
1 task
This branch was previously deployed
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.
What does this PR do?
Fuses batch-invariant MCore MoE token permutation with MXFP8 quantization while preserving the inverse-map and zero-padding contracts required by deterministic unpermute.
The fused Triton kernel can now optionally:
(token, local expert) -> permuted rowinverse map;mcore_fused_moeuses this path for batch-invariant MXFP8 squared-ReLU and SwiGLU. Activation behavior is unchanged; only input permutation and quantization are fused.Issue tracking
Linked issue: Fixes #7659
Performance
RTX 5090, PyTorch 2.11.0+cu128, Triton 3.6.0. Each measurement covers batch-invariant preprocessing: permutation, zero padding, inverse-map generation, and MXFP8 quantization.
Validation
TestPermuteAndQuantizeMxfp8plustest_batch_invariant_mxfp8_permute_replays: 24 passed, 1 environment-incompatible test deselected on SM120.scaled_grouped_mmdoes not support SM120.tools/check_kernel_determinism_coverage.py --base-ref upstream/mainpasses.py_compile, andgit diff --checkpass for all changed files.Contribution process
Pre-checks
inference_moe_kernelsmanifest entry covers this kernel file