Skip to content

test(megatron): cover compiled MXFP4 backward - #987

Merged
gphuang merged 1 commit into
fix/megatron/energon-resume-statefrom
test/megatron/mxfp4-compiled-backward
Aug 13, 2026
Merged

test(megatron): cover compiled MXFP4 backward#987
gphuang merged 1 commit into
fix/megatron/energon-resume-statefrom
test/megatron/mxfp4-compiled-backward

Conversation

@gphuang

@gphuang gphuang commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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

  • 35 config and audit tests passed
  • Compiled-backward checks passed for FP8 and BF16 forward modes
  • Flux 535M forward-only integration test passed
  • black formatting verified
  • GPU memory returned to idle

Prove forward-only precision modes preserve exact MXFP4 gradients through torch.compile and cover their runtime wiring.
@gphuang

gphuang commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Verdict: compiled-backward coverage is ready to merge

No blocking findings in the full base-to-head diff.

  • Exact eager/compiled outputs and input/weight gradients passed for FP8 and BF16 forward with MXFP4 backward.
  • Config propagation, runtime audit emission, and the Flux integration path passed on GPU.
  • Required CI is green; GPU CI is skipped, with the equivalent targeted GPU gate run on the allocated node.

Two optional hardening ideas—testing a future non-default backward mode and pinning preshuffle state inside the test—do not affect the current production path.

@gphuang
gphuang marked this pull request as ready for review August 13, 2026 16:44
@gphuang
gphuang merged commit f031983 into fix/megatron/energon-resume-state Aug 13, 2026
7 checks passed
@gphuang
gphuang deleted the test/megatron/mxfp4-compiled-backward branch August 13, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant