Skip to content

[oncall][ci] Fix stale disable_cuda_graphs references after #5353 - #5711

Merged
fegin merged 1 commit into
mainfrom
fix-disable-accelerator-graphs
Oct 30, 2026
Merged

fegin merged 1 commit into
mainfrom
fix-disable-accelerator-graphs

Conversation

@fegin

@fegin fegin commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary (human-written)

Merge conflicts from the previous PRs cause CI failing. disable_cuda_graph->disable_accelerator_graphs

Why

CPU Unit Test fails on main: https://github.com/pytorch/torchtitan/actions/runs/40973844709/job/123796998693

#5353 renamed training.disable_cuda_graphs to training.disable_accelerator_graphs. #4920 and #5556 landed after it and still use the old name. TestShippedCpRecipes::test_every_cp_recipe_passes_the_gate builds deepseek_v4_debugmodel_fsdp4_ep4 and fails:

AttributeError: 'TrainingConfig' object has no attribute 'disable_cuda_graphs'

rl_grpo_deepseek_v3_debug_varlen in alphabet_sort.py has the same stale keyword. No CPU test builds it, but it raises TypeError when run.

What changed

  • Mechanical rename in two places: tests/integration_tests/models.py and torchtitan_recipes/tests/rl/alphabet_sort.py.

Testing

  • git grep disable_cuda_graphs returns nothing.
  • Expect the CPU Unit Test job on this PR to pass test_every_cp_recipe_passes_the_gate.

Rename the two remaining uses of training.disable_cuda_graphs to training.disable_accelerator_graphs.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 30, 2026
@fegin
fegin marked this pull request as ready for review October 30, 2026 00:48
@fegin
fegin requested a review from tianyu-l as a code owner October 30, 2026 00:48
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Oct 30, 2026
@github-actions
github-actions Bot requested a review from pzhan9 October 30, 2026 00:48
@fegin

fegin commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@claude please review

@claude

claude Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @fegin's task in 53s —— View job


Approve: a correct, complete mechanical rename to disable_accelerator_graphs. See the review.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_graphs on HEAD returns nothing, so the rename is complete.
  • alphabet_sort.py imports TrainingConfig from torchtitan.config (line 27). That is the same dataclass that defines disable_accelerator_graphs, so the keyword is valid.
  • Numerics: the flag value is unchanged (True in 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:52 still sets trainer._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).

@fegin
fegin merged commit ad7a993 into main Oct 30, 2026
20 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants