Repository navigation
test(checkpointing): seed CPU initialization in checkpoint load test - #8263
Merged
balasaajay merged 1 commit intoOct 15, 2026
Merged
balasaajay merged 1 commit into
balasaajay merged 1 commit into
Conversation
Signed-off-by: Chen Cui <chcui@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
cuichenx
marked this pull request as ready for review
October 15, 2026 17:47
deepakn94
self-requested a review
October 15, 2026 17:57
deepakn94
approved these changes
Oct 15, 2026
ilml
approved these changes
Oct 15, 2026
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/38821466909 |
nemo-autobot-origin Bot
pushed a commit
to svcnemo-autobot/Megatron-LM
that referenced
this pull request
Oct 16, 2026
Bring in NVIDIA#8263, which seeds the CPU-initialized models in test_checkpoint_load_without_microbatch_calculator. This PR's testmon selection runs those 16 cases alone. Without the seed, the data-parallel ranks build different reference weights, and the H100 unit job hangs in the NCCL barrier of the next case's fixture. Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
This was referenced Oct 16, 2026
This branch was successfully 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?
Seed both model constructions in
test_checkpoint_load_without_microbatch_calculatorwithtorch.manual_seed(123).The fixture seeds CUDA RNGs, but this test initializes its model weights on the CPU. Without an explicit CPU seed, data-parallel ranks can construct different reference weights. The legacy
torchcheckpoint saves rank 0's replica, so other ranks compare the restored weights against a different reference. Earlier tests can accidentally align CPU RNG states and mask the failure.This is a two-line, test-only change. The restored model is still zeroed before loading, and the separate pre-load seed of 987 and all weight/output/RNG assertions remain unchanged. No production code or copyright changes.
Issue tracking
For PRs from open-source community contributors:
Linked issue: Related to #7792, which introduced this test.
Contribution process
Pre-checks
jit_fuser/torch.compile, CUDA extension, TE or external-library dispatch, or a scatter/index accumulation), I have added or updated its bit-exact determinism test and registered it intests/unit_tests/determinism/kernels/manifest.py(guide)Existing unit-test setup is corrected; no new test cases, GPU kernels, or public APIs are added.
3914483fd: the same adversarial setup reproduces the original weight-equality assertion on ranks 1–3. Fixed head:d0d34b404. Experiment scripts are external to the PR.git diff --check, scoped Black and Ruff checks pass.Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.