Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/160781
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 488c992 with merge base 284b719 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
tianyu-l
left a comment
There was a problem hiding this comment.
LGTM!
Maybe should get stamped by someone more familiar with the code.
albanD
left a comment
There was a problem hiding this comment.
Sounds ok but needs tests!
| context_fn: Callable[[], Tuple[ContextManager, ContextManager]] = noop_context_fn, | ||
| determinism_check: str = _DEFAULT_DETERMINISM_MODE, | ||
| debug: bool = False, | ||
| early_stop: bool = True, |
There was a problem hiding this comment.
Can we make these kwargs only for the doc? Because passing them positionally won't work.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / win-vs2022-cpu-py3 / build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: trunk / win-vs2022-cpu-py3 / build Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / win-vs2022-cuda12.6-py3 / build Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: trunk / win-vs2022-cuda12.6-py3 / build, trunk / win-vs2022-cpu-py3 / build, trunk / linux-jammy-cuda12.8-py3.10-gcc11 / test (default, 5, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
SAC interaction with triton kernel: - In eager, triton ops are not dispatchable, and so it is always ignored by SAC, i.e., always recomputed. - In compile, although we wrap triton kernels into HOPs, allowing us to intercept them, we still recompute by default rather than save by default, so that compile maintains the invariant of using less memory than eager. - If you want to do something else (e.g. save the output of your triton kernel) you should wrap it in a custom op. Pull Request resolved: #161541 Approved by: https://github.com/drisspg, https://github.com/zou3519 ghstack dependencies: #160781
…n workaround (#1580) Depends on pytorch/pytorch#160781 This PR: - Add config to AC to toggle early-stop with a default of False - Reverts A2A autograd.Function workaround More context in #1467 (comment) Leak reproable from @tianyu-l 's comment: ``` CONFIG_FILE=./torchtitan/experiments/llama4/train_configs/debug_model.toml ./run_train.sh --parallelism.expert_parallel_degree=2 --activation_checkpoint.mode=full ``` Without early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:07:18,537 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.82GiB(1.03%) tps: 4,900 tflops: 0.37 mfu: 0.12% [rank0]:[titan] 2025-08-18 06:07:18,538 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:07:18,718 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 1.35GiB(1.71%) tps: 91,012 tflops: 6.83 mfu: 2.19% [rank0]:[titan] 2025-08-18 06:07:18,910 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 1.73GiB(2.19%) tps: 85,603 tflops: 6.43 mfu: 2.06% [rank0]:[titan] 2025-08-18 06:07:19,076 - root - INFO - step: 4 loss: 4.1728 grad_norm: 3.0683 memory: 2.25GiB(2.84%) tps: 98,808 tflops: 7.42 mfu: 2.38% [rank0]:[titan] 2025-08-18 06:07:19,247 - root - INFO - step: 5 loss: 3.5788 grad_norm: 3.1740 memory: 2.64GiB(3.34%) tps: 96,348 tflops: 7.23 mfu: 2.32% [rank0]:[titan] 2025-08-18 06:07:19,419 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7157 memory: 3.04GiB(3.84%) tps: 95,197 tflops: 7.15 mfu: 2.29% [rank0]:[titan] 2025-08-18 06:07:19,581 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7939 memory: 3.46GiB(4.37%) tps: 101,865 tflops: 7.65 mfu: 2.45% [rank0]:[titan] 2025-08-18 06:07:19,768 - root - INFO - step: 8 loss: 3.0511 grad_norm: 1.2923 memory: 3.88GiB(4.90%) tps: 87,393 tflops: 6.56 mfu: 2.10% [rank0]:[titan] 2025-08-18 06:07:19,933 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7737 memory: 4.41GiB(5.58%) tps: 99,667 tflops: 7.48 mfu: 2.40% [rank0]:[titan] 2025-08-18 06:07:20,126 - root - INFO - step: 10 loss: 2.9731 grad_norm: 0.5428 memory: 4.87GiB(6.15%) tps: 85,447 tflops: 6.42 mfu: 2.06% ``` With early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.61GiB(0.77%) tps: 4,709 tflops: 0.35 mfu: 0.11% [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:09:32,643 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 0.70GiB(0.89%) tps: 92,171 tflops: 6.92 mfu: 2.22% [rank0]:[titan] 2025-08-18 06:09:32,799 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 0.70GiB(0.89%) tps: 105,162 tflops: 7.90 mfu: 2.53% [rank0]:[titan] 2025-08-18 06:09:32,960 - root - INFO - step: 4 loss: 4.1729 grad_norm: 3.0684 memory: 0.70GiB(0.89%) tps: 102,732 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,117 - root - INFO - step: 5 loss: 3.5789 grad_norm: 3.1744 memory: 0.70GiB(0.89%) tps: 104,545 tflops: 7.85 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,284 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7160 memory: 0.70GiB(0.89%) tps: 98,415 tflops: 7.39 mfu: 2.37% [rank0]:[titan] 2025-08-18 06:09:33,437 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7937 memory: 0.70GiB(0.89%) tps: 107,744 tflops: 8.09 mfu: 2.59% [rank0]:[titan] 2025-08-18 06:09:33,594 - root - INFO - step: 8 loss: 3.0512 grad_norm: 1.2927 memory: 0.70GiB(0.89%) tps: 104,634 tflops: 7.86 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,754 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7741 memory: 0.70GiB(0.89%) tps: 102,704 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,926 - root - INFO - step: 10 loss: 2.9730 grad_norm: 0.5423 memory: 0.70GiB(0.89%) tps: 96,116 tflops: 7.22 mfu: 2.31% ``` Another workaround as suggested by @xmfan is to have a SAC policy to save the A2A. This PR intends to address the full AC case.
…n workaround (#1580) Depends on pytorch/pytorch#160781 This PR: - Add config to AC to toggle early-stop with a default of False - Reverts A2A autograd.Function workaround More context in #1467 (comment) Leak reproable from @tianyu-l 's comment: ``` CONFIG_FILE=./torchtitan/experiments/llama4/train_configs/debug_model.toml ./run_train.sh --parallelism.expert_parallel_degree=2 --activation_checkpoint.mode=full ``` Without early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:07:18,537 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.82GiB(1.03%) tps: 4,900 tflops: 0.37 mfu: 0.12% [rank0]:[titan] 2025-08-18 06:07:18,538 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:07:18,718 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 1.35GiB(1.71%) tps: 91,012 tflops: 6.83 mfu: 2.19% [rank0]:[titan] 2025-08-18 06:07:18,910 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 1.73GiB(2.19%) tps: 85,603 tflops: 6.43 mfu: 2.06% [rank0]:[titan] 2025-08-18 06:07:19,076 - root - INFO - step: 4 loss: 4.1728 grad_norm: 3.0683 memory: 2.25GiB(2.84%) tps: 98,808 tflops: 7.42 mfu: 2.38% [rank0]:[titan] 2025-08-18 06:07:19,247 - root - INFO - step: 5 loss: 3.5788 grad_norm: 3.1740 memory: 2.64GiB(3.34%) tps: 96,348 tflops: 7.23 mfu: 2.32% [rank0]:[titan] 2025-08-18 06:07:19,419 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7157 memory: 3.04GiB(3.84%) tps: 95,197 tflops: 7.15 mfu: 2.29% [rank0]:[titan] 2025-08-18 06:07:19,581 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7939 memory: 3.46GiB(4.37%) tps: 101,865 tflops: 7.65 mfu: 2.45% [rank0]:[titan] 2025-08-18 06:07:19,768 - root - INFO - step: 8 loss: 3.0511 grad_norm: 1.2923 memory: 3.88GiB(4.90%) tps: 87,393 tflops: 6.56 mfu: 2.10% [rank0]:[titan] 2025-08-18 06:07:19,933 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7737 memory: 4.41GiB(5.58%) tps: 99,667 tflops: 7.48 mfu: 2.40% [rank0]:[titan] 2025-08-18 06:07:20,126 - root - INFO - step: 10 loss: 2.9731 grad_norm: 0.5428 memory: 4.87GiB(6.15%) tps: 85,447 tflops: 6.42 mfu: 2.06% ``` With early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.61GiB(0.77%) tps: 4,709 tflops: 0.35 mfu: 0.11% [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:09:32,643 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 0.70GiB(0.89%) tps: 92,171 tflops: 6.92 mfu: 2.22% [rank0]:[titan] 2025-08-18 06:09:32,799 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 0.70GiB(0.89%) tps: 105,162 tflops: 7.90 mfu: 2.53% [rank0]:[titan] 2025-08-18 06:09:32,960 - root - INFO - step: 4 loss: 4.1729 grad_norm: 3.0684 memory: 0.70GiB(0.89%) tps: 102,732 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,117 - root - INFO - step: 5 loss: 3.5789 grad_norm: 3.1744 memory: 0.70GiB(0.89%) tps: 104,545 tflops: 7.85 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,284 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7160 memory: 0.70GiB(0.89%) tps: 98,415 tflops: 7.39 mfu: 2.37% [rank0]:[titan] 2025-08-18 06:09:33,437 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7937 memory: 0.70GiB(0.89%) tps: 107,744 tflops: 8.09 mfu: 2.59% [rank0]:[titan] 2025-08-18 06:09:33,594 - root - INFO - step: 8 loss: 3.0512 grad_norm: 1.2927 memory: 0.70GiB(0.89%) tps: 104,634 tflops: 7.86 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,754 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7741 memory: 0.70GiB(0.89%) tps: 102,704 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,926 - root - INFO - step: 10 loss: 2.9730 grad_norm: 0.5423 memory: 0.70GiB(0.89%) tps: 96,116 tflops: 7.22 mfu: 2.31% ``` Another workaround as suggested by @xmfan is to have a SAC policy to save the A2A. This PR intends to address the full AC case.
We already have a context manager "set_checkpoint_early_stop". This PR adds a kwarg that toggles the same setting. It is also useful to have a kwarg version of the setting in addition to the context manager because is annoying to apply a context manager when the AC is being applied via CheckpointWrapper. Similar to the "debug" kwarg and the corresponding "set_checkpoint_debug_enabled" context manager, the context manager defaults to None and overrides the local setting when non-None. Pull Request resolved: pytorch#160781 Approved by: https://github.com/tianyu-l
SAC interaction with triton kernel: - In eager, triton ops are not dispatchable, and so it is always ignored by SAC, i.e., always recomputed. - In compile, although we wrap triton kernels into HOPs, allowing us to intercept them, we still recompute by default rather than save by default, so that compile maintains the invariant of using less memory than eager. - If you want to do something else (e.g. save the output of your triton kernel) you should wrap it in a custom op. Pull Request resolved: pytorch#161541 Approved by: https://github.com/drisspg, https://github.com/zou3519 ghstack dependencies: pytorch#160781
…n workaround (pytorch#1580) Depends on pytorch/pytorch#160781 This PR: - Add config to AC to toggle early-stop with a default of False - Reverts A2A autograd.Function workaround More context in pytorch#1467 (comment) Leak reproable from @tianyu-l 's comment: ``` CONFIG_FILE=./torchtitan/experiments/llama4/train_configs/debug_model.toml ./run_train.sh --parallelism.expert_parallel_degree=2 --activation_checkpoint.mode=full ``` Without early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:07:18,537 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.82GiB(1.03%) tps: 4,900 tflops: 0.37 mfu: 0.12% [rank0]:[titan] 2025-08-18 06:07:18,538 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:07:18,718 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 1.35GiB(1.71%) tps: 91,012 tflops: 6.83 mfu: 2.19% [rank0]:[titan] 2025-08-18 06:07:18,910 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 1.73GiB(2.19%) tps: 85,603 tflops: 6.43 mfu: 2.06% [rank0]:[titan] 2025-08-18 06:07:19,076 - root - INFO - step: 4 loss: 4.1728 grad_norm: 3.0683 memory: 2.25GiB(2.84%) tps: 98,808 tflops: 7.42 mfu: 2.38% [rank0]:[titan] 2025-08-18 06:07:19,247 - root - INFO - step: 5 loss: 3.5788 grad_norm: 3.1740 memory: 2.64GiB(3.34%) tps: 96,348 tflops: 7.23 mfu: 2.32% [rank0]:[titan] 2025-08-18 06:07:19,419 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7157 memory: 3.04GiB(3.84%) tps: 95,197 tflops: 7.15 mfu: 2.29% [rank0]:[titan] 2025-08-18 06:07:19,581 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7939 memory: 3.46GiB(4.37%) tps: 101,865 tflops: 7.65 mfu: 2.45% [rank0]:[titan] 2025-08-18 06:07:19,768 - root - INFO - step: 8 loss: 3.0511 grad_norm: 1.2923 memory: 3.88GiB(4.90%) tps: 87,393 tflops: 6.56 mfu: 2.10% [rank0]:[titan] 2025-08-18 06:07:19,933 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7737 memory: 4.41GiB(5.58%) tps: 99,667 tflops: 7.48 mfu: 2.40% [rank0]:[titan] 2025-08-18 06:07:20,126 - root - INFO - step: 10 loss: 2.9731 grad_norm: 0.5428 memory: 4.87GiB(6.15%) tps: 85,447 tflops: 6.42 mfu: 2.06% ``` With early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.61GiB(0.77%) tps: 4,709 tflops: 0.35 mfu: 0.11% [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:09:32,643 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 0.70GiB(0.89%) tps: 92,171 tflops: 6.92 mfu: 2.22% [rank0]:[titan] 2025-08-18 06:09:32,799 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 0.70GiB(0.89%) tps: 105,162 tflops: 7.90 mfu: 2.53% [rank0]:[titan] 2025-08-18 06:09:32,960 - root - INFO - step: 4 loss: 4.1729 grad_norm: 3.0684 memory: 0.70GiB(0.89%) tps: 102,732 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,117 - root - INFO - step: 5 loss: 3.5789 grad_norm: 3.1744 memory: 0.70GiB(0.89%) tps: 104,545 tflops: 7.85 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,284 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7160 memory: 0.70GiB(0.89%) tps: 98,415 tflops: 7.39 mfu: 2.37% [rank0]:[titan] 2025-08-18 06:09:33,437 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7937 memory: 0.70GiB(0.89%) tps: 107,744 tflops: 8.09 mfu: 2.59% [rank0]:[titan] 2025-08-18 06:09:33,594 - root - INFO - step: 8 loss: 3.0512 grad_norm: 1.2927 memory: 0.70GiB(0.89%) tps: 104,634 tflops: 7.86 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,754 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7741 memory: 0.70GiB(0.89%) tps: 102,704 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,926 - root - INFO - step: 10 loss: 2.9730 grad_norm: 0.5423 memory: 0.70GiB(0.89%) tps: 96,116 tflops: 7.22 mfu: 2.31% ``` Another workaround as suggested by @xmfan is to have a SAC policy to save the A2A. This PR intends to address the full AC case.
…n workaround (pytorch#1580) Depends on pytorch/pytorch#160781 This PR: - Add config to AC to toggle early-stop with a default of False - Reverts A2A autograd.Function workaround More context in pytorch#1467 (comment) Leak reproable from @tianyu-l 's comment: ``` CONFIG_FILE=./torchtitan/experiments/llama4/train_configs/debug_model.toml ./run_train.sh --parallelism.expert_parallel_degree=2 --activation_checkpoint.mode=full ``` Without early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:07:18,537 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.82GiB(1.03%) tps: 4,900 tflops: 0.37 mfu: 0.12% [rank0]:[titan] 2025-08-18 06:07:18,538 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:07:18,718 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 1.35GiB(1.71%) tps: 91,012 tflops: 6.83 mfu: 2.19% [rank0]:[titan] 2025-08-18 06:07:18,910 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 1.73GiB(2.19%) tps: 85,603 tflops: 6.43 mfu: 2.06% [rank0]:[titan] 2025-08-18 06:07:19,076 - root - INFO - step: 4 loss: 4.1728 grad_norm: 3.0683 memory: 2.25GiB(2.84%) tps: 98,808 tflops: 7.42 mfu: 2.38% [rank0]:[titan] 2025-08-18 06:07:19,247 - root - INFO - step: 5 loss: 3.5788 grad_norm: 3.1740 memory: 2.64GiB(3.34%) tps: 96,348 tflops: 7.23 mfu: 2.32% [rank0]:[titan] 2025-08-18 06:07:19,419 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7157 memory: 3.04GiB(3.84%) tps: 95,197 tflops: 7.15 mfu: 2.29% [rank0]:[titan] 2025-08-18 06:07:19,581 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7939 memory: 3.46GiB(4.37%) tps: 101,865 tflops: 7.65 mfu: 2.45% [rank0]:[titan] 2025-08-18 06:07:19,768 - root - INFO - step: 8 loss: 3.0511 grad_norm: 1.2923 memory: 3.88GiB(4.90%) tps: 87,393 tflops: 6.56 mfu: 2.10% [rank0]:[titan] 2025-08-18 06:07:19,933 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7737 memory: 4.41GiB(5.58%) tps: 99,667 tflops: 7.48 mfu: 2.40% [rank0]:[titan] 2025-08-18 06:07:20,126 - root - INFO - step: 10 loss: 2.9731 grad_norm: 0.5428 memory: 4.87GiB(6.15%) tps: 85,447 tflops: 6.42 mfu: 2.06% ``` With early-stop=False: ``` [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - step: 1 loss: 8.0588 grad_norm: 1.4694 memory: 0.61GiB(0.77%) tps: 4,709 tflops: 0.35 mfu: 0.11% [rank0]:[titan] 2025-08-18 06:09:32,465 - root - INFO - Synchronizing and adjusting timeout for all ProcessGroups to 0:01:40 [rank0]:[titan] 2025-08-18 06:09:32,643 - root - INFO - step: 2 loss: 6.6677 grad_norm: 2.1904 memory: 0.70GiB(0.89%) tps: 92,171 tflops: 6.92 mfu: 2.22% [rank0]:[titan] 2025-08-18 06:09:32,799 - root - INFO - step: 3 loss: 4.3877 grad_norm: 2.3935 memory: 0.70GiB(0.89%) tps: 105,162 tflops: 7.90 mfu: 2.53% [rank0]:[titan] 2025-08-18 06:09:32,960 - root - INFO - step: 4 loss: 4.1729 grad_norm: 3.0684 memory: 0.70GiB(0.89%) tps: 102,732 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,117 - root - INFO - step: 5 loss: 3.5789 grad_norm: 3.1744 memory: 0.70GiB(0.89%) tps: 104,545 tflops: 7.85 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,284 - root - INFO - step: 6 loss: 3.2758 grad_norm: 1.7160 memory: 0.70GiB(0.89%) tps: 98,415 tflops: 7.39 mfu: 2.37% [rank0]:[titan] 2025-08-18 06:09:33,437 - root - INFO - step: 7 loss: 3.1672 grad_norm: 1.7937 memory: 0.70GiB(0.89%) tps: 107,744 tflops: 8.09 mfu: 2.59% [rank0]:[titan] 2025-08-18 06:09:33,594 - root - INFO - step: 8 loss: 3.0512 grad_norm: 1.2927 memory: 0.70GiB(0.89%) tps: 104,634 tflops: 7.86 mfu: 2.52% [rank0]:[titan] 2025-08-18 06:09:33,754 - root - INFO - step: 9 loss: 3.1330 grad_norm: 0.7741 memory: 0.70GiB(0.89%) tps: 102,704 tflops: 7.71 mfu: 2.47% [rank0]:[titan] 2025-08-18 06:09:33,926 - root - INFO - step: 10 loss: 2.9730 grad_norm: 0.5423 memory: 0.70GiB(0.89%) tps: 96,116 tflops: 7.22 mfu: 2.31% ``` Another workaround as suggested by @xmfan is to have a SAC policy to save the A2A. This PR intends to address the full AC case.
Stack from ghstack (oldest at bottom):
We already have a context manager "set_checkpoint_early_stop". This PR adds a kwarg that toggles the same setting.
It is also useful to have a kwarg version of the setting in addition to the context manager because is annoying to apply a context manager when the AC is being applied via CheckpointWrapper.
Similar to the "debug" kwarg and the corresponding "set_checkpoint_debug_enabled" context manager, the context manager defaults to None and overrides the local setting when non-None.
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta