Repository navigation
[oncall][ci] Fix stale disable_cuda_graphs references after #5353 - #5711
Merged
Merged
Conversation
Rename the two remaining uses of training.disable_cuda_graphs to training.disable_accelerator_graphs.
fegin
marked this pull request as ready for review
October 30, 2026 00:48
fegin
requested review from
acisseJZhong,
felipemello1,
shuhuayu and
wwwjn
as code owners
October 30, 2026 00:48
Contributor
Author
|
@claude please review |
Contributor
Contributor
There was a problem hiding this comment.
Verdict: Approve -- a mechanical two-line rename that brings the last two callers in line with TrainingConfig.disable_accelerator_graphs (torchtitan/config/configs.py:73), which fixes the CPU unit test that is failing on main.
What this PR does. #5353 renamed training.disable_cuda_graphs to training.disable_accelerator_graphs. Two later PRs merged after it and still used the old name. This PR updates those two callers.
Example.
# before (main): building the integration test definition raises
config.training.disable_cuda_graphs = True
# AttributeError: 'TrainingConfig' object has no attribute 'disable_cuda_graphs'
# before (main): the RL recipe raises when built
TrainingConfig(disable_cuda_graphs=True, ...) # TypeError: unexpected keyword
# after: both use the existing field
config.training.disable_accelerator_graphs = True
TrainingConfig(disable_accelerator_graphs=True, ...)Details
git grep disable_cuda_graphson HEAD returns nothing, so the rename is complete.alphabet_sort.pyimportsTrainingConfigfromtorchtitan.config(line 27). That is the same dataclass that definesdisable_accelerator_graphs, so the keyword is valid.- Numerics: the flag value is unchanged (
Truein both places). Only the field name is fixed, so behavior matches what the authors of #4920 and #5556 intended. - Unrelated and harmless:
tests/unit_tests/cpu/components/test_invalid_loss.py:52still setstrainer._deferred_cuda_graph_options = None. No code reads that attribute any more, so the line is dead, but it sets a plain attribute and doesn't fail. If someone wants to clean it up, it belongs in a separate PR.
Not verified: the CPU Unit Test job result on this PR (left to CI).
tianyu-l
approved these changes
Oct 30, 2026
tianyu-l
pushed a commit
that referenced
this pull request
Nov 3, 2026
## Summary (human-written)
<!-- Write this yourself, not with an AI tool. 2-5 sentences: the
problem, why
this approach, and what you checked yourself. -->
## Why
#5353 renamed `torchtitan/distributed/cuda_graph.py` and `CUDA_GRAPH.md`
to `accelerator_graph.py` and `ACCELERATOR_GRAPH.md`. #5711 fixed
`disable_cuda_graphs` call sites and left these globs.
An accelerator_graph-only PR no longer gets `ciflow/rl`, so the RL
workflows that label starts do not run, and the `cuda_graph` area no
longer requests fegin. Nothing else under `ciflow/rl` matches that diff:
not `torchtitan/rl/**`, `tests/rl/**`, `scripts/rl/**`,
`torchtitan/trainer.py`, the checkpointer, data,
`torchtitan/models/common/**`, qwen3_5, qwen3_8, or the RL workflow yaml
names.
**Example.** A PR that only edits
`torchtitan/distributed/accelerator_graph.py`:
| | Before | After |
| --- | --- | --- |
| `ciflow/rl` | not applied; RL workflows stay off | applied; RL
workflows can run |
| area reviewers | `cuda_graph` does not match, so fegin is not
requested | `cuda_graph` matches and requests fegin |
## What changed
Path metadata only. The label name `ciflow/rl`, the area name
`cuda_graph`, and reviewer `fegin` are unchanged.
- `.github/labeler.yml`: `torchtitan/distributed/cuda_graph.py` ->
`torchtitan/distributed/accelerator_graph.py`
- `.github/area_reviewers.yml`: `torchtitan/distributed/cuda_graph.py`
and `torchtitan/distributed/CUDA_GRAPH.md` ->
`torchtitan/distributed/accelerator_graph.py` and
`torchtitan/distributed/ACCELERATOR_GRAPH.md`
`torchtitan/experiments/graph_trainer/cuda_graph.py` is a different file
that still exists. The distributed area does not point at it.
## Alternatives considered
- Do not fold `accelerator_graph.py` under
`torchtitan/models/common/**`. That glob already labels model changes,
and it would not request fegin for the graph files.
## User-facing changes
None for training. CI label behavior only.
| Before | After |
| --- | --- |
| Editing `torchtitan/distributed/accelerator_graph.py` or
`ACCELERATOR_GRAPH.md` does not add `ciflow/rl` and does not request
fegin | Those edits add `ciflow/rl`, and the `cuda_graph` area requests
fegin |
## Testing
`git grep` under `.github/` shows no remaining
`torchtitan/distributed/cuda_graph.py` or
`torchtitan/distributed/CUDA_GRAPH.md`. No GPU run. No new test: this is
yaml path metadata.
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 (human-written)
Merge conflicts from the previous PRs cause CI failing.
disable_cuda_graph->disable_accelerator_graphsWhy
CPU Unit Test fails on main: https://github.com/pytorch/torchtitan/actions/runs/40973844709/job/123796998693
#5353 renamed
training.disable_cuda_graphstotraining.disable_accelerator_graphs. #4920 and #5556 landed after it and still use the old name.TestShippedCpRecipes::test_every_cp_recipe_passes_the_gatebuildsdeepseek_v4_debugmodel_fsdp4_ep4and fails:rl_grpo_deepseek_v3_debug_varleninalphabet_sort.pyhas the same stale keyword. No CPU test builds it, but it raisesTypeErrorwhen run.What changed
tests/integration_tests/models.pyandtorchtitan_recipes/tests/rl/alphabet_sort.py.Testing
git grep disable_cuda_graphsreturns nothing.test_every_cp_recipe_passes_the_gate.