Move TE cross entropy guard to training args#5162
Merged
Merged
Conversation
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
0446db6 to
bf436d6
Compare
cuichenx
approved these changes
Jun 4, 2026
deepakn94
approved these changes
Jun 4, 2026
Contributor
Author
|
/ok to test bf436d6 |
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Contributor
|
/ok to test 288795f |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/27016083461 |
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
Follow-up to #5115. This keeps the TE cross entropy fusion safety guard in
validate_args, but removes it fromModelParallelConfig.__post_init__so programmatic config construction is not blocked.ModelParallelConfig(cross_entropy_loss_fusion=True, cross_entropy_fusion_impl='te')to be constructed.Test Plan
UV_CACHE_DIR=/home/yuya/Projects/Megatron-LM/.uv-cache uv run isort --check-only tests/unit_tests/test_model_parallel_config.pyUV_CACHE_DIR=/home/yuya/Projects/Megatron-LM/.uv-cache uv run black --check tests/unit_tests/test_model_parallel_config.py megatron/core/model_parallel_config.pyPYTHONPYCACHEPREFIX=/home/yuya/Projects/Megatron-LM/.pycache-check /home/yuya/mypython/bin/python -m py_compile megatron/core/model_parallel_config.py tests/unit_tests/test_model_parallel_config.pyLocal focused pytest could not complete on this workstation: direct run is blocked by the local
nvidia-resiliency-extdev version assertion (0.6.0.dev69compares below required0.6.0); masking NVRx as unavailable gets past that but the local CUDA/PyTorch driver mismatch segfaults during import.