feat(megatron): select MXFP4 forward precision - #986
Merged
gphuang merged 2 commits intoAug 13, 2026
Merged
Conversation
added 2 commits
August 13, 2026 15:34
Allow late-stage recovery runs to raise only forward GEMM precision while retaining the validated MXFP4 backward path.
Exercise FP8 and BF16 forward paths through PrimusUT-compatible subtests and align the precision census assertion with logger output.
Contributor
Author
Verdict: forward-only MXFP4 routing approvedNo blocking findings in the full base-to-head diff through
Ready to merge. |
gphuang
marked this pull request as ready for review
August 13, 2026 16:26
gphuang
requested review from
Xiaoming-AMD,
limou102 and
wenxie-amd
as code owners
August 13, 2026 16:26
5 tasks
gphuang
added a commit
that referenced
this pull request
Aug 13, 2026
## Summary Closes the post-merge review gap from PR #986. Adds regression coverage for FP8/BF16 forward with MXFP4 backward through `torch.compile`, including exact eager/compiled output and gradient comparisons. It also covers YAML-to-`FluxConfig` precision propagation and runtime mode-census emission. ## Test plan - [x] 35 config and audit tests passed - [x] Compiled-backward checks passed for FP8 and BF16 forward modes - [x] Flux 535M forward-only integration test passed - [x] `black` formatting verified - [x] GPU memory returned to idle Co-authored-by: Guangpu Huang <guangphu@crs-m2m-cpu-spur-012.us-east2-a.compute.internal>
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.
Summary
Tracks Issue 220.
Add independent MXFP4 forward precision selection so late recovery runs can use FP8 or BF16 forward GEMMs while keeping MXFP4 data- and weight-gradient GEMMs.
mxfp4_forward_precisionconfig plumbing and runtime mode census.Test plan
git diff --check