chore: nightly sync main into dev (12_06_2026)
Summary
Nightly sync of 36 commits from main into dev (12_06_2026).
- Python lines: +3024 / -1299 across 38 files
- Merge commit
ae955ca9c— a true 2-parent merge oforigin/dev+origin/main(git merge origin/main --no-edit), conflicts resolved surgically (no global-X theirs).
Conflict resolutions (13 files)
Philosophy: preserve dev-only features; take main wholesale only for the skill's override list; combine where both sides added.
| File | Resolution |
|---|---|
megatron/training/training.py |
main (override list); renamed args.hybrid_context_parallel → args.dynamic_context_parallel — main's alias is undefined in dev's arguments.py (would AttributeError) |
megatron/core/optimizer/optimizer.py |
combine — kept dev-only prepare_model_params_for_param_sync; took main's _filter_grads_for_norm/get_grads_for_grad_norm refactor (#4116; every caller, incl. layer_wise_optimizer.py, uses it) |
megatron/core/transformer/multi_token_prediction.py |
combine — dev's mhc_multistream branch + main's mtp_detach_heads & grad_norm_group='mtp' (#4116) |
megatron/core/transformer/transformer_config.py |
dev — mhc-only recompute_modules (main's gdn_norm_out deferred with GDN, below) |
megatron/core/ssm/gated_delta_net.py |
dev (non-override) — main's #4913/#4715 conflict irreconcilably with dev's per-seq + dynamic-CP impl; deferred |
tests/unit_tests/ssm/test_gated_delta_net.py |
dev — matches dev's GDN impl |
megatron/training/utils/common_utils.py |
combine — dev imports + main's #5251 group= reduction helpers (required by override training.py) |
megatron/elastification/pretrain_hybrid_flex.py |
dev (non-override) — main's #5194 refactor deferred; dev's imports resolve in the merged tree (get_batch_on_this_cp_rank re-exported from megatron.training.utils) |
README.md |
dev — dev maintains an intentionally distinct README |
tests/test_utils/recipes/moe2.0.yaml |
dev — git rename-detection artifact vs intentionally-deleted bert.yaml |
tests/unit_tests/transformer/test_multi_token_prediction.py |
combine — main's grad-norm-group assertion + dev's extended provide_output_weight/fuse_linear_cross_entropy test |
uv.lock |
dev — dependency triple kept = dev |
tests/test_utils/recipes/h100/t5.yaml |
removed — dev intentionally deleted it (prior sync 08_04_2026 did the same) |
Also restored docker/Dockerfile.ci.dev to dev's version (the dependency triple must stay dev's).
Deleted files (honored dev's intent)
tests/test_utils/recipes/h100/t5.yamlandh100/bert.yaml— present in the merge-base, intentionally removed on dev; kept removed.
Deferred main commits (preserved dev per skill rule)
Two non-override-file refactors conflicted irreconcilably with dev's evolved versions and were deferred ("main wins wholesale only for the override list"):
- #4913 (fuse per-seq AlltoAll in GDN) + #4715 (selective
norm_outrecompute) — dev keeps its per-sequence + dynamic-CP GDN impl. - #5194 (elastification
get_batchrefactor) — dev'spretrain_hybrid_flex.pykept (self-consistent, imports resolve).
Post-merge audits performed
- API mismatch: verified callers/callees agree — optimizer (
get_grads_for_grad_normcallers ✓), MTP (grad_norm_grouptagging + dev fusion both present ✓),training.py↔common_utilsgroup=✓,HybridCPDataLoaderWrapperimport resolves (data_schedule.pycorrectly combines dev's schedulers + main's wrapper) ✓. - Dev-feature preservation (merge-base audit):
comm-based audit of dev-added-vs-merge-base lines dropped by the merge → 0 genuine dev-feature drops. - CODEOWNERS == dev ✓, dependency triple (
pyproject.toml/uv.lock/Dockerfile.ci.dev) == dev ✓.
Conflict-resolution remerge-diff (git show --remerge-diff ae955ca9c) — file stat
README.md | 76 +-
docker/Dockerfile.ci.dev | 6 +-
megatron/core/optimizer/optimizer.py | 5 -
megatron/core/ssm/gated_delta_net.py | 175 +--
megatron/core/transformer/multi_token_prediction.py| 4 -
megatron/core/transformer/transformer_config.py | 22 -
megatron/elastification/pretrain_hybrid_flex.py | 130 +--
megatron/training/training.py | 1088 +++++-----------
megatron/training/utils/common_utils.py | 4 -
tests/test_utils/recipes/h100/t5.yaml | 115 ---
tests/test_utils/recipes/moe2.0.yaml | 4 -
tests/unit_tests/ssm/test_gated_delta_net.py | 297 +---
tests/unit_tests/transformer/test_multi_token_prediction.py | 24 -
uv.lock | 405 +------
🤖 Generated with Claude Code
This pull request requires additional validation before any workflows can run on NVIDIA's runners.
Pull request vetters can view their responsibilities here.
Contributors can view more details about this message here.
/ok to test ae955ca9c1df0ea507ac454da58521e33cd3a7df
/ok to test 8883bf3a395e79c189d4c1864029dc049ac144f7
/ok to test 10c588e3acd1d864bc22abbf42ca3a3f31d7eab4
/ok to test b0d49c928aea45eab3243d187be60727fa19953a
Pushed rolling fix b0d49c928 resolving the two remaining functional-test failures, both root-caused to dev-only training.py features that the merge's main-override silently reverted (core code kept dev's version):
moe/gpt3_..._scoped_cudagraph—mtp_1 loss16× too small (0.682 vs golden 10.915). Main'smtp_loss_scale = 1 / get_num_microbatches()double-normalized the MTP log loss; dev'sMTPLossLoggingHelperalready stores raw sums + token counts and computes the per-token loss after reduction, so the scale must be1.0.gpt/gpt3_..._dsv4_hybrid_mhc_mtp— NCCL all_reduce timeout (PP-stage-0 raced to the timer barrier while the last stage hung indsa.py reduce_loss_in_tracker). Restored thenum_layers+csa_compress_ratiosargs toDSAIndexerLossLoggingHelper.track_indexer_metrics;num_layerslets first-stage ranks lazily init the indexer tracker and join the cross-PP all_reduce.
Both pass on dev (#5305/#5223), so they were sync-caused, not pre-existing.
/ok to test b0d49c928aea45eab3243d187be60727fa19953a
Superseded by today's nightly sync.
/ok to test 0302fac
/ok to test 9a924391d9471623b998c2d594457c41ced56f13
/ok to test 95654c95642ec0f56316e2dd36edfe8333ec5d6b