Repository navigation
[CP] Fix incorrect indentation - #1880
Merged
Merged
Conversation
Introduced by #1776. Verified with the comment: ``` CONFIG_FILE="./torchtitan/models/llama3/train_configs/debug_model.toml" ./run_train.sh --training.steps=10 --parallelism.context_parallel_degree=8 ```
wwwjn
approved these changes
Oct 15, 2025
tianyu-l
reviewed
Oct 15, 2025
| torch._dynamo.utils.maybe_enable_compiled_autograd(True) | ||
| ) | ||
|
|
||
| if cp_context: |
Contributor
There was a problem hiding this comment.
could you help answer #1807 (comment)
as it is related to the PR which you removed MATH backend treatment for CP
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
Introduced by pytorch#1776. Verified with the comment: ``` CONFIG_FILE="./torchtitan/models/llama3/train_configs/debug_model.toml" ./run_train.sh --training.steps=10 --parallelism.context_parallel_degree=8 ``` w/o this PR ``` [rank4]:[titan] 2025-10-14 23:10:44,306 - root - INFO - step: 1 loss: 8.0385 grad_norm: 1.3444 memory: 1.21GiB(1.27%) tps: 2,904 tflops: 0.21 mfu: 0.02% [rank4]:[titan] 2025-10-14 23:10:44,306 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank4]:[titan] 2025-10-14 23:10:44,347 - root - INFO - step: 2 loss: 7.6989 grad_norm: 1.4401 memory: 1.34GiB(1.41%) tps: 49,366 tflops: 3.53 mfu: 0.36% [rank4]:[titan] 2025-10-14 23:10:44,388 - root - INFO - step: 3 loss: 7.0687 grad_norm: 1.8302 memory: 1.34GiB(1.41%) tps: 51,400 tflops: 3.68 mfu: 0.37% [rank4]:[titan] 2025-10-14 23:10:44,425 - root - INFO - step: 4 loss: 6.2672 grad_norm: 2.2684 memory: 1.34GiB(1.41%) tps: 55,749 tflops: 3.99 mfu: 0.40% [rank4]:[titan] 2025-10-14 23:10:44,465 - root - INFO - step: 5 loss: 5.3015 grad_norm: 2.5508 memory: 1.34GiB(1.41%) tps: 50,835 tflops: 3.64 mfu: 0.37% [rank4]:[titan] 2025-10-14 23:10:44,522 - root - INFO - step: 6 loss: 4.7779 grad_norm: 2.4103 memory: 1.34GiB(1.41%) tps: 36,188 tflops: 2.59 mfu: 0.26% [rank4]:[titan] 2025-10-14 23:10:44,573 - root - INFO - step: 7 loss: 4.4823 grad_norm: 2.2675 memory: 1.34GiB(1.41%) tps: 41,167 tflops: 2.95 mfu: 0.30% [rank4]:[titan] 2025-10-14 23:10:44,618 - root - INFO - step: 8 loss: 4.3291 grad_norm: 1.9877 memory: 1.34GiB(1.41%) tps: 45,962 tflops: 3.29 mfu: 0.33% [rank4]:[titan] 2025-10-14 23:10:44,656 - root - INFO - step: 9 loss: 4.7022 grad_norm: 1.5639 memory: 1.34GiB(1.41%) tps: 53,689 tflops: 3.84 mfu: 0.39% [rank4]:[titan] 2025-10-14 23:10:44,695 - root - INFO - step: 10 loss: 4.1905 grad_norm: 1.8200 memory: 1.34GiB(1.41%) tps: 52,967 tflops: 3.79 mfu: 0.38% ``` w/ this PR ``` [rank4]:[titan] 2025-10-14 23:09:32,084 - root - INFO - step: 1 loss: 8.1003 grad_norm: 1.4468 memory: 0.23GiB(0.24%) tps: 150 tflops: 0.01 mfu: 0.00% [rank4]:[titan] 2025-10-14 23:09:32,085 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank4]:[titan] 2025-10-14 23:09:32,151 - root - INFO - step: 2 loss: 7.7710 grad_norm: 1.5711 memory: 0.25GiB(0.26%) tps: 30,879 tflops: 2.21 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,218 - root - INFO - step: 3 loss: 7.0456 grad_norm: 1.9929 memory: 0.25GiB(0.26%) tps: 30,642 tflops: 2.19 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,283 - root - INFO - step: 4 loss: 6.1601 grad_norm: 2.3669 memory: 0.25GiB(0.26%) tps: 31,723 tflops: 2.27 mfu: 0.23% [rank4]:[titan] 2025-10-14 23:09:32,349 - root - INFO - step: 5 loss: 5.2561 grad_norm: 2.5374 memory: 0.25GiB(0.26%) tps: 31,047 tflops: 2.22 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,420 - root - INFO - step: 6 loss: 4.8109 grad_norm: 2.8868 memory: 0.25GiB(0.26%) tps: 29,067 tflops: 2.08 mfu: 0.21% [rank4]:[titan] 2025-10-14 23:09:32,488 - root - INFO - step: 7 loss: 4.4534 grad_norm: 2.4835 memory: 0.25GiB(0.26%) tps: 30,383 tflops: 2.17 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,554 - root - INFO - step: 8 loss: 4.2613 grad_norm: 2.1554 memory: 0.25GiB(0.26%) tps: 31,078 tflops: 2.22 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,619 - root - INFO - step: 9 loss: 4.6215 grad_norm: 1.7431 memory: 0.25GiB(0.26%) tps: 31,814 tflops: 2.28 mfu: 0.23% [rank4]:[titan] 2025-10-14 23:09:32,687 - root - INFO - step: 10 loss: 4.0993 grad_norm: 2.0867 memory: 0.25GiB(0.26%) tps: 30,272 tflops: 2.17 mfu: 0.22% ```
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 25, 2026
Introduced by pytorch#1776. Verified with the comment: ``` CONFIG_FILE="./torchtitan/models/llama3/train_configs/debug_model.toml" ./run_train.sh --training.steps=10 --parallelism.context_parallel_degree=8 ``` w/o this PR ``` [rank4]:[titan] 2025-10-14 23:10:44,306 - root - INFO - step: 1 loss: 8.0385 grad_norm: 1.3444 memory: 1.21GiB(1.27%) tps: 2,904 tflops: 0.21 mfu: 0.02% [rank4]:[titan] 2025-10-14 23:10:44,306 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank4]:[titan] 2025-10-14 23:10:44,347 - root - INFO - step: 2 loss: 7.6989 grad_norm: 1.4401 memory: 1.34GiB(1.41%) tps: 49,366 tflops: 3.53 mfu: 0.36% [rank4]:[titan] 2025-10-14 23:10:44,388 - root - INFO - step: 3 loss: 7.0687 grad_norm: 1.8302 memory: 1.34GiB(1.41%) tps: 51,400 tflops: 3.68 mfu: 0.37% [rank4]:[titan] 2025-10-14 23:10:44,425 - root - INFO - step: 4 loss: 6.2672 grad_norm: 2.2684 memory: 1.34GiB(1.41%) tps: 55,749 tflops: 3.99 mfu: 0.40% [rank4]:[titan] 2025-10-14 23:10:44,465 - root - INFO - step: 5 loss: 5.3015 grad_norm: 2.5508 memory: 1.34GiB(1.41%) tps: 50,835 tflops: 3.64 mfu: 0.37% [rank4]:[titan] 2025-10-14 23:10:44,522 - root - INFO - step: 6 loss: 4.7779 grad_norm: 2.4103 memory: 1.34GiB(1.41%) tps: 36,188 tflops: 2.59 mfu: 0.26% [rank4]:[titan] 2025-10-14 23:10:44,573 - root - INFO - step: 7 loss: 4.4823 grad_norm: 2.2675 memory: 1.34GiB(1.41%) tps: 41,167 tflops: 2.95 mfu: 0.30% [rank4]:[titan] 2025-10-14 23:10:44,618 - root - INFO - step: 8 loss: 4.3291 grad_norm: 1.9877 memory: 1.34GiB(1.41%) tps: 45,962 tflops: 3.29 mfu: 0.33% [rank4]:[titan] 2025-10-14 23:10:44,656 - root - INFO - step: 9 loss: 4.7022 grad_norm: 1.5639 memory: 1.34GiB(1.41%) tps: 53,689 tflops: 3.84 mfu: 0.39% [rank4]:[titan] 2025-10-14 23:10:44,695 - root - INFO - step: 10 loss: 4.1905 grad_norm: 1.8200 memory: 1.34GiB(1.41%) tps: 52,967 tflops: 3.79 mfu: 0.38% ``` w/ this PR ``` [rank4]:[titan] 2025-10-14 23:09:32,084 - root - INFO - step: 1 loss: 8.1003 grad_norm: 1.4468 memory: 0.23GiB(0.24%) tps: 150 tflops: 0.01 mfu: 0.00% [rank4]:[titan] 2025-10-14 23:09:32,085 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank4]:[titan] 2025-10-14 23:09:32,151 - root - INFO - step: 2 loss: 7.7710 grad_norm: 1.5711 memory: 0.25GiB(0.26%) tps: 30,879 tflops: 2.21 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,218 - root - INFO - step: 3 loss: 7.0456 grad_norm: 1.9929 memory: 0.25GiB(0.26%) tps: 30,642 tflops: 2.19 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,283 - root - INFO - step: 4 loss: 6.1601 grad_norm: 2.3669 memory: 0.25GiB(0.26%) tps: 31,723 tflops: 2.27 mfu: 0.23% [rank4]:[titan] 2025-10-14 23:09:32,349 - root - INFO - step: 5 loss: 5.2561 grad_norm: 2.5374 memory: 0.25GiB(0.26%) tps: 31,047 tflops: 2.22 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,420 - root - INFO - step: 6 loss: 4.8109 grad_norm: 2.8868 memory: 0.25GiB(0.26%) tps: 29,067 tflops: 2.08 mfu: 0.21% [rank4]:[titan] 2025-10-14 23:09:32,488 - root - INFO - step: 7 loss: 4.4534 grad_norm: 2.4835 memory: 0.25GiB(0.26%) tps: 30,383 tflops: 2.17 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,554 - root - INFO - step: 8 loss: 4.2613 grad_norm: 2.1554 memory: 0.25GiB(0.26%) tps: 31,078 tflops: 2.22 mfu: 0.22% [rank4]:[titan] 2025-10-14 23:09:32,619 - root - INFO - step: 9 loss: 4.6215 grad_norm: 1.7431 memory: 0.25GiB(0.26%) tps: 31,814 tflops: 2.28 mfu: 0.23% [rank4]:[titan] 2025-10-14 23:09:32,687 - root - INFO - step: 10 loss: 4.0993 grad_norm: 2.0867 memory: 0.25GiB(0.26%) tps: 30,272 tflops: 2.17 mfu: 0.22% ```
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.
Introduced by #1776.
Verified with the comment:
w/o this PR
w/ this PR