Repository navigation
[CI Fix][B200] Refresh Kimi K3 DistMuon golden - #5559
Merged
Merged
Conversation
acisseJZhong
marked this pull request as ready for review
October 20, 2026 05:39
acisseJZhong
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
October 20, 2026 05:39
tianyu-l
approved these changes
Oct 20, 2026
Contributor
Author
|
The GraphTrainer B200 failure on this PR is the independent SimpleFSDP parameter-inspection issue fixed in #5560. That fix now passes the full GraphTrainer B200 workflow: https://github.com/pytorch/torchtitan/actions/runs/39375868492 The relevant validation for this golden-only PR is the regular B200 workflow: https://github.com/pytorch/torchtitan/actions/runs/39374678479 |
Contributor
Author
|
The regular B200 workflow passes with the refreshed golden: https://github.com/pytorch/torchtitan/actions/runs/39374678479 |
acisseJZhong
added a commit
that referenced
this pull request
Oct 20, 2026
…pection (#5560) ## Summary - Inspect parameter shard placements with SimpleFSDP parametrizations disabled. - Add a regression test for reapplying data parallel to an already parametrized quantized weight. ## Root cause The GraphTrainer B200 job fails in `graph_trainer_dist_moe_mxfp8_fsdp_ep_pp` while applying pipeline-stage parallelism: https://github.com/pytorch/torchtitan/actions/runs/39351458272/job/118396337526 `data_parallel()` computes `linear_param_shard_placements(model)` before its module loop skips modules that already have SimpleFSDP. On a reused/shared module that GraphPP has already parametrized, reading `child.weight` during that inspection invokes `ReplicateComputation` and tries to build the MXFP8 compute operands. This happens during model construction, while the model is still on the `meta` device and before `to_empty(device=...)`. Dist-MoE checks both `weight.is_cuda` and `weight.is_contiguous()` but reports either failure as `ValueError: weight must be contiguous CUDA storage`. Here the failed condition is `weight.is_cuda == False`, not contiguity. ### Regression provenance #4867 introduced the unconditional `linear_param_shard_placements(model)` scan that reads parametrized `child.weight`. #4949 later allowed callers to supply placements explicitly, but retained that scan on the default path. The workflow installs `dist_moe@main` rather than a pinned revision. The last passing run on October 15 installed `dist_moe@6f0c3d4216`: https://github.com/pytorch/torchtitan/actions/runs/38663506034 The first failing run on October 16 installed `dist_moe@e3d21b8d2a`: https://github.com/pytorch/torchtitan/actions/runs/38832949153 Between those revisions, meta-pytorch/dist_moe@fa32967a85 added the valid CUDA/contiguous input contract and exposed the latent GraphTrainer bug. That commit has no associated public GitHub PR. The Dist-MoE check should not be weakened and the dependency should not be pinned back: parameter-layout inspection should never execute the parameter's compute representation in the first place. ### Fix Use GraphTrainer's existing `disable_active_parametrization()` context while inspecting shard placements. Inspection now sees the raw sharded parameter instead of materializing its compute representation; actual forward parametrization is unchanged. An initial attempt to call `.contiguous()` at the Dist-MoE boundary failed with the same error, confirming that the meta device, not storage stride, was the violated contract: https://github.com/pytorch/torchtitan/actions/runs/39374680382/job/118470042165 ## Test plan - `pytest -q torchtitan/experiments/graph_trainer/tests/test_simple_fsdp.py -k reapplying_data_parallel -vv` (pass) - `SKIP=pyrefly-check pre-commit run --all-files` (pass) - Full GraphTrainer B200 workflow (pass): https://github.com/pytorch/torchtitan/actions/runs/39375868492 The shared local environment has an older PyTorch/Pyrefly API set than current main, so the Pyrefly hook is left to CI. The regular B200 failure on this PR is the independent Kimi K3 golden drift fixed in #5559. Its reported values exactly match #5559's updated golden, and that PR passes the regular B200 workflow: https://github.com/pytorch/torchtitan/actions/runs/39374678479
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
Fixes #5449.
Root cause
#5399 intentionally changed the first accumulated weight gradient from a BF16 GEMM result later upcast to FP32 into a GEMM that produces FP32 directly. Kimi uses eight chunked LM-head losses even when outer gradient accumulation is one, so this changes the first WGRAD and the seven following in-place FP32 accumulations. The next optimizer update consequently changes losses from step 2 onward.
#5399 refreshed affected A10G goldens and #5423 refreshed MI350X goldens, but the Kimi B200 golden was omitted. The observed B200 sequence is bitwise identical across independent runs and later PyTorch nightlies:
Step 1 loss and grad norm remain unchanged, matching the expected first-update boundary.
Test plan
SKIP=pyrefly-check pre-commit run --all-files(pass)ciflow/b200.Local Pyrefly is unavailable because the shared venv uses PyTorch 2.14 and older optional APIs than current main.