chore: nightly sync main into dev (08_04_2026) - #4213
Conversation
…et of parameters in the model (#4028) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: qiyuw <qiyuw@nvidia.com> Co-authored-by: qiyuw <qiyuw@nvidia.com> Co-authored-by: Deepak Narayanan <dnarayanan@nvidia.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Co-authored-by: root <root@pool0-0084.cm.cluster> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: root <root@pool0-0393.cm.cluster> Co-authored-by: root <root@pool0-0154.cm.cluster> Co-authored-by: root <root@pool0-0021.cm.cluster> Co-authored-by: root <root@pool0-0331.cm.cluster> Co-authored-by: root <root@pool0-0079.cm.cluster> Co-authored-by: root <root@pool0-0137.cm.cluster>
Signed-off-by: rislam <rislam@nvidia.com> Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com> Co-authored-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: dimapihtar <dpihtar@gmail.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…2288) Co-authored-by: lvdunlin <lvdunlin@xiaomi.com> Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com>
Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…lly (#3899) Signed-off-by: dimapihtar <dpihtar@gmail.com> Co-authored-by: Seonmyeong Bak <sbak@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: dimapihtar <dpihtar@gmail.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
…limits (#4072) Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: meg miranda <mmiranda@nvidia.com>
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com> Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: oliver könig <okoenig@nvidia.com> Co-authored-by: ldl <140483453+lvdunlin@users.noreply.github.com> Co-authored-by: lvdunlin <lvdunlin@xiaomi.com> Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jinliang Li <jinliangl@eos0065.eos.clusters.nvidia.com> Co-authored-by: Cory Ye <44509866+cspades@users.noreply.github.com>
|
/ok to test 2da3cd3 |
Add missing docstrings to abstract methods and deduplicate the DynamicGradScaler __init__ docstring (args already documented in the class docstring).
|
/ok to test 0ba3188 |
…r import training.py (from main) imports HybridCPDataLoaderWrapper from data_schedule, which only exists in main's version. Dev's version has different classes (BasePackingScheduler etc.) that are only used by the dev-only data_schedule_utils.py.
|
/ok to test 65b9207 |
Keep dev's classes (BasePackingScheduler, DpBalancedScheduler, DefaultDynamicCPScheduler, get_batch_on_this_rank_for_sequence_packing) and add main's HybridCPDataLoaderWrapper. Both are needed: training.py imports HybridCPDataLoaderWrapper, pretrain_gpt.py and tests import get_batch_on_this_rank_for_sequence_packing.
|
/ok to test 030bbb7 |
CI Results SummaryCI Run: https://github.com/NVIDIA/Megatron-LM/actions/runs/24158033075 Passed (20/22 unit test jobs + all infrastructure)
Pre-existing failures (NOT caused by this sync)
ConclusionAll sync-related issues have been resolved. The remaining failures are pre-existing bugs on the dev branch. This PR is ready for human review. |
|
Superseded by today's nightly sync. |
Changes based on review of PR NVIDIA#4213 and NVIDIA#4165: 1. Don't blindly restore files deleted by dev — check whether main's code actually imports them before restoring. Dev may have intentionally removed files to simplify testing. 2. Include remerge-diff in PR body so reviewers can inspect only the conflict resolutions without wading through the full merge diff. 3. Add warning about squashed-merge chains: when dev has PR1→PR2→PR3 but only PR1 is on main, -X theirs may overwrite PR2/PR3's follow-up changes. Claude should check git log on dev for follow-up commits before favoring main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- .github/workflows/multi-approval-bot.yml was removed in dev by commit 2b4b9c4 ("ci: Remove multi-approval action from dev branch") - tests/test_utils/recipes/h100/bert.yaml and t5.yaml are not referenced by any test or config on this branch Per updated workflow rules: only restore deleted files if main's code actually imports/references them.
|
/ok to test 40d3094 |
# Conflicts: # pyproject.toml
|
/ok to test 4e8407e |
CI Results — Run 4 (post-conflict resolution + file cleanup)CI Run: https://github.com/NVIDIA/Megatron-LM/actions/runs/24269755502 Passed (11/17 unit test jobs + all infrastructure)
Pre-existing failures (NOT caused by this sync)All 6 unit test failures share the same root cause: Failed jobs: pipeline_parallel, dist_checkpointing/models/test_moe_experts, resharding, models, transformer, transformer/moe, catchall
Changes in this run vs previous
|
Summary
Synced 102 commits from
mainintodevusinggit merge origin/main -X theirs(main wins textual conflicts).Files overridden with main's version (semantic conflicts)
These files had semantic conflicts where dev's version references args/APIs that main removed or renamed:
pyproject.toml+uv.lock(lock-file consistency)docker/Dockerfile.ci.dev(build compatibility)megatron/training/training.py(references dev-only args)megatron/training/initialize.py(references dev-only args)megatron/training/utils.py(references dev-only args)megatron/training/datasets/data_samplers.py(references dev-only args)megatron/core/optimizer/layer_wise_optimizer.py(constructor signature)Special merge:
megatron/core/datasets/data_schedule.pyMain and dev have completely different classes. Kept dev's classes (
BasePackingScheduler,DpBalancedScheduler,DefaultDynamicCPScheduler,wrap_data_iterator,get_batch_on_this_rank_for_sequence_packing) and appended main'sHybridCPDataLoaderWrapperclass. Both are needed:training.pyimportsHybridCPDataLoaderWrapper;pretrain_gpt.pyand tests import the dev classes.Files restored from main (deleted in dev)
megatron/core/pipeline_parallel/hybrid_cp_schedule.py— imported bydata_schedule.py(from megatron.core.pipeline_parallel.hybrid_cp_schedule import BalancedCPScheduler)Files NOT restored (dev intentionally deleted)
.github/workflows/multi-approval-bot.yml— removed in dev by commit 2b4b9c4 ("ci: Remove multi-approval action from dev branch")tests/test_utils/recipes/h100/bert.yaml,t5.yaml— not referenced by any testAdditional fixes
megatron/core/optimizer/grad_scaler.py(missing docstrings on abstract methods, long lines in__init__docstring)black+isorton all 111 changed Python filesConflict resolution (remerge-diff)
git --remerge-diffnot available (git 2.34 < 2.36 required). The merge used-X theirswhich auto-resolved all textual conflicts in favor of main. No manual conflict resolution was needed beyond the explicit file overrides listed above. Spot-checkedcuda_graphs.py,param_and_grad_buffer.py, andoptimizer.pyfor squash-merge chain issues — all correctly merged with no lost dev improvements.Pre-existing test failures (NOT caused by this sync)
All failures below exist identically on
origin/dev— the failing code was not modified by this sync.1.
single_grouped_weightTypeError (6 jobs)Error:
TypeError: GroupedLinear.__init__() got an unexpected keyword argument 'single_grouped_weight'Location:
megatron/core/extensions/transformer_engine.py:1767Root cause: Dev added
single_grouped_weightas a kwarg toTEColumnParallelGroupedLinear.__init__()(lines 1760-1761), but the Transformer Engine version in the CI container does not accept this parameter inGroupedLinear.__init__(). The same code exists onorigin/dev— this is a TE version mismatch, not a sync issue.Evidence:
git show origin/dev:megatron/core/extensions/transformer_engine.pycontains the identical lines. Main does not have this kwarg at all.Affected jobs:
tests/unit_tests/pipeline_parallel/**/*.pytests/unit_tests/dist_checkpointing/models/test_moe_experts.pytests/unit_tests/resharding/**/*.pytests/unit_tests/models/**/*.pytests/unit_tests/transformer/moe/**/*.pytests/unit_tests/**/*.py(catchall shard)2.
moe_use_legacy_grouped_gemmTypeError (subset of pipeline_parallel)Error:
TypeError: get_gpt_layer_with_transformer_engine_submodules() got an unexpected keyword argument 'moe_use_legacy_grouped_gemm'Location:
tests/unit_tests/pipeline_parallel/test_fine_grained_activation_offloading.py:631Root cause: Dev-only test passes
moe_use_legacy_grouped_gemm=Falsetoget_gpt_layer_with_transformer_engine_spec(), which forwards all kwargs toget_gpt_layer_with_transformer_engine_submodules(). That function does not accept this kwarg on either branch.Evidence: The test does not exist on main. The function signature is identical on both
mainanddev.3.
zero_grad_bufferAttributeError (subset of transformer)Error:
AttributeError: 'Linear' object has no attribute 'zero_grad_buffer'Location:
tests/unit_tests/transformer/test_vision_cuda_graphs.py::test_create_cudagraphs_no_callables_is_noopRoot cause: Test file is byte-identical on main and dev (
git diff origin/main..origin/devshows no diff). Passes on main CI but fails in dev container — likely a dependency version difference.Evidence: Same test passes on main merge queue CI run 24156473054.
4.
Nemo_CICD_Testgate failureRoot cause: Downstream aggregation gate that fails because unit tests above failed and integration tests were skipped (not triggered for this PR type). This is expected given the upstream failures.
Test plan