Skip to content

Move pull and trunk CI jobs from Python 3.10 to 3.11 - #198271

Closed
atalman wants to merge 5 commits into
pytorch:mainfrom
atalman:move_pull_trunk_to_311
Closed

atalman wants to merge 5 commits into
pytorch:mainfrom
atalman:move_pull_trunk_to_311

Conversation

@atalman

@atalman atalman commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

2.15 raises the minimum supported Python to 3.11, so move the pull and trunk lanes off 3.10. Companion to #198233, which drops 3.10 from the nightly binary matrix.

Renames job ids, job names, build-environment labels and python-version inputs in pull.yml and trunk.yml, and provides the 3.11 docker images those jobs now reference.

Images

Three explicitly versioned images are referenced by the renamed jobs:

image status
pytorch-linux-jammy-py3.11-clang21 already existed
pytorch-linux-jammy-aarch64-py3.11-gcc13 added
pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-clang20 added

The aarch64 one needs an explicit case in build.sh — the catch-all would not set ACL/OPENBLAS. The clang20 one is fine on the catch-all, which is how its 3.10 counterpart is already built. Both are added to docker-builds.yml so they're actually built and pushed.

⚠️ Not complete: six jobs still run 3.10 containers

Worth a close look before merging. These carry a py3.11 label but point at unversioned py3 images whose ANACONDA_PYTHON_VERSION is still 3.10:

workflow job image
pull linux-jammy-rocm-py3.11 pytorch-linux-jammy-rocm-n-py3
pull linux-noble-xpu-n-py3.11 pytorch-linux-noble-xpu-n-py3
trunk libtorch-linux-jammy-cuda13.2-py3.11-gcc11 ...cuda13.2-cudnn9-py3-gcc11
trunk linux-jammy-cuda13.2-py3.11-gcc11 ...cuda13.2-cudnn9-py3-gcc11
trunk linux-jammy-cuda13.2-py3.11-gcc11-no-ops ...cuda13.2-cudnn9-py3-gcc11
trunk linux-jammy-py3.11-gcc11 (verify-cachebench) ...py3-gcc11-inductor-benchmarks

Completing these means bumping ANACONDA_PYTHON_VERSION on the shared images, which moves inductor, periodic, nightly, docs-build and operator_benchmark at the same time. That's a decision for the owners of those lanes rather than something to slip into a pull/trunk change, so I left it as follow-up. Happy to do it here instead if you'd rather.

Test plan

  • All 13 pytorch-linux-* images referenced by pull.yml/trunk.yml after the rename resolve to something build.sh can build and docker-builds.yml builds. Verified programmatically, not by eye.
  • pull.yml, trunk.yml, docker-builds.yml all parse as YAML.
  • build.sh passes bash -n.
  • Zero py3.10 / py3_10 references remain in either workflow.

Note on viable_strict.md

Updated the pull required-check name to match. The trunk line there already referenced linux-jammy-cuda13.0-py3.10-gcc11, which doesn't exist in trunk.yml (it's cuda13.2 now) — that staleness predates this change, so I left it rather than guessing at the intended job.

Heads-up for reviewers: this renames required check names (pull / linux-jammy-py3.10-gcc11 / test → .../py3.11-gcc11 / test), so branch-protection or merge-rule config referencing the old names may need updating in step.

cc @malfet @seemethere @ZainRizvi @huydhn


🤖 Generated with Claude Code

2.15 raises the minimum supported Python to 3.11, so move the pull and
trunk lanes off 3.10. Renames the job ids, job names, build-environment
labels and python-version inputs in pull.yml and trunk.yml, and provides
the 3.11 docker images those jobs now reference.

Images
------
Three explicitly versioned images are referenced by the renamed jobs:

  pytorch-linux-jammy-py3.11-clang21                  already existed
  pytorch-linux-jammy-aarch64-py3.11-gcc13            added
  pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-clang20  added

The aarch64 one needs an explicit case in build.sh because the catch-all
would not set ACL/OPENBLAS; the clang20 one is fine on the catch-all,
which is how its 3.10 counterpart is already built. Both are added to
docker-builds.yml so they are actually built and pushed.

Verified that all 13 pytorch-linux-* images referenced by pull.yml and
trunk.yml after the rename resolve to something build.sh can build and
docker-builds.yml builds. All three workflows parse as YAML and build.sh
passes bash -n.

Not complete: six jobs still run 3.10 containers
------------------------------------------------
These jobs carry a py3.11 label but point at *unversioned* py3 images
whose ANACONDA_PYTHON_VERSION is still 3.10:

  pull.yml  linux-jammy-rocm-py3.11               pytorch-linux-jammy-rocm-n-py3
  pull.yml  linux-noble-xpu-n-py3.11              pytorch-linux-noble-xpu-n-py3
  trunk.yml libtorch-linux-jammy-cuda13.2-py3.11-gcc11  ...cuda13.2-cudnn9-py3-gcc11
  trunk.yml linux-jammy-cuda13.2-py3.11-gcc11           ...cuda13.2-cudnn9-py3-gcc11
  trunk.yml linux-jammy-cuda13.2-py3.11-gcc11-no-ops    ...cuda13.2-cudnn9-py3-gcc11
  trunk.yml linux-jammy-py3.11-gcc11 (verify-cachebench) ...py3-gcc11-inductor-benchmarks

Completing those means bumping ANACONDA_PYTHON_VERSION on the shared
images, which moves inductor, periodic, nightly, docs-build and
operator_benchmark at the same time -- a decision for the owners of those
lanes rather than something to slip into a pull/trunk change. Left as
follow-up; the labels are renamed so the lane is consistent, but the
containers for those six are still 3.10.

viable_strict.md
----------------
Updated the pull required-check name to match. The trunk line there
already referenced linux-jammy-cuda13.0-py3.10-gcc11, which does not
exist in trunk.yml (it is cuda13.2 now) -- that staleness predates this
change and is left alone rather than guessed at.
@atalman
atalman requested a review from a team as a code owner September 22, 2026 20:36
@pytorch-bot

pytorch-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/198271

Note: Links to docs will display an error until the docs builds have been completed.

❌ 7 Pending, 1 Unrelated Failure, 1 Unclassified Failure

As of commit 7596344 with merge base 0a2852d (image):

🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:

  • Never trivial
    • docs/source/community/viable_strict.md edits the policy list of core jobs that block viable/strict
    • Renames required check pull / linux-jammy-py3.10-gcc11 / test in pull.yml, which merge rules, HUD and Dr. CI key on
  • Correctness
    • linux-jammy-cuda13_2-py3_11-gcc11-build in trunk.yml is labeled 3.11 but uses cuda13.2-cudnn9-py3-gcc11, still ANACONDA_PYTHON_VERSION=3.10 in build.sh
    • The PR body lists six such jobs whose py3.11 labels and python-version inputs do not match their containers
  • Scope
    • Renames dozens of job ids, names and build-environment values across pull.yml, trunk.yml and three other workflows
    • Swaps three py3.10 aarch64 image definitions for py3.11 ones in .ci/docker/build.sh and docker-builds.yml
  • Socialization
    • Moving the minimum-Python CI lanes to 3.11 is a project-level decision that CI owners need to see land

reason: not_trivial
Reviewed commit: 7cb437e (NOT the current head 7596344)

Inference job

🐛 Report a wrong verdict

NEW FAILURES SUPPRESSED BY AI (non-blocking) - The following job failed, but the AI CI Advisor judged the failure not to be evidence against this change:

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@atalman atalman added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 22, 2026
pytorch-linux-jammy-rocm-n-py3-benchmarks,
pytorch-linux-jammy-cuda13.0-cudnn9-py3.10-clang20,
pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-clang20,
pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-clang20,

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.

Could we clean up some of these 3.10 Docker images if they are not in used anymore? It's a waste of resource building them

@huydhn

huydhn commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@claude Check if we can clean up some Docker images for 3.10 if they are not in used in CI anymore

@claude

claude Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Claude finished @huydhn's task in 9m 18s —— View job


py3.10 Docker image cleanup audit

  • List all py3.10 images in docker-builds.yml / build.sh
  • Grep every workflow + CI script for references to each
  • Report which are dead vs still in use

I checked all 8 py3.10 images in docker-builds.yml against every reference in the repo (including the dynamic cuda${{ ... }} / py${{ matrix.python-version }} interpolations in torchtitan.yml, dynamo-unittest.yml, inductor-unittest.yml). Two are safe to drop, one more is one line away.

Full audit of the 8 py3.10 images
image docker-builds.yml referenced by verdict
pytorch-linux-jammy-py3.10-clang21 :63 slow.yml, nightly.yml, periodic.yml, periodic-strict.yml, docs-build.yml, td-holdout-unstable.yml keep
...cuda13.0-cudnn9-py3.10-clang20 :74 periodic.yml:108 keep
...cuda13.2-cudnn9-py3.10-clang20 :75 nothing (was only pull.yml, which this PR moved to py3.11-clang20) DEAD — remove
...cuda13.4-cudnn9-py3.10-clang20 :77 periodic.yml:317 keep
...cuda13.0-cudnn9-py3.10-linter :87 lint.yml:61 keep
...aarch64-cuda13.0-cudnn9-py3.10-gcc13 :94 nothing — and nothing at HEAD~1 either DEAD already — remove
...aarch64-py3.10-gcc13 :103 operator_benchmark.yml:88 only removable, see below
...aarch64-py3.10-gcc13-inductor-benchmarks :109 inductor-perf-test-nightly-aarch64.yml:86 keep

Verification for the two dead ones (empty output = no reference outside docker-builds.yml / build.sh):

$ git grep -n 'cuda13.2-cudnn9-py3.10-clang20' -- ':!.github/workflows/docker-builds.yml' ':!.ci/docker/build.sh'
$ git grep -n 'aarch64-cuda13.0-cudnn9-py3.10-gcc13' -- ':!.github/workflows/docker-builds.yml' ':!.ci/docker/build.sh'
$ git grep -c 'aarch64-cuda13.0-cudnn9-py3.10-gcc13' HEAD~1 -- .github/workflows .ci
HEAD~1:.ci/docker/build.sh:1
HEAD~1:.github/workflows/docker-builds.yml:1

1. pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-clang20 — dead as of this PR

pull.yml:477 was its only consumer and this PR repointed it to ...py3.11-clang20. Drop docker-builds.yml:75; there's no build.sh case arm to remove (it builds off the catch-all).

2. pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13 — already dead before this PR

Zero references at HEAD~1 too, so this is pre-existing dead weight, and it's an arm64 CUDA build — likely the most expensive single entry in the list. The other two aarch64-CUDA images are cuda13.2-py3.12 and cuda13.4-py3.12, so this looks like a leftover from a CUDA bump that forgot to delete the old one. Worth a sanity check with the arm64 owners first, since 13.0 is still CUDA_STABLE — if something out-of-repo (test-infra) pulls it, my grep wouldn't see that. Removal touches docker-builds.yml:94-96 and build.sh:330-337.

3. pytorch-linux-jammy-aarch64-py3.10-gcc13 — one line from dead

After this PR its only consumer is operator_benchmark.yml:88. Retargeting that to the py3.11-gcc13 image this PR already adds kills another arm64 build:

-      docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc13
+      docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.11-gcc13

(also build-environment on the line above, for consistency). Your call whether operator_benchmark moving to 3.11 belongs in this PR — it's a benchmark lane, so lower risk than the shared py3 image bumps @atalman deferred.

Timing note

.ci/docker/ is content-hashed, so touching build.sh forces a full image rebuild. This PR already modifies build.sh, so folding the build.sh deletions in here is free — doing it in a follow-up would pay the rebuild cost a second time. Worth bundling.

Not doing the edit

All three changes land in .github/workflows/, which I can't write to (the GitHub App token has no workflows permission), so I've left this as analysis rather than a commit. FAQ. @atalman can apply items 1 and 2 directly; Fix this → if you'd rather have it scripted.
· branch move_pull_trunk_to_311

Follow-up to the 3.11 move in this PR, from the audit in the review
thread.

pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-clang20
  pull.yml was its only consumer and this PR repointed that job to the
  py3.11 variant, so the image is dead as of this change. Only the
  docker-builds.yml entry goes; it has no build.sh case arm, it builds
  off the catch-all.

pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13
  Zero references anywhere, and zero on upstream/main too, so this is
  pre-existing dead weight rather than something this PR stranded. An
  arm64 CUDA build, so likely the most expensive entry in the list.
  Removes both the docker-builds.yml matrix include and the build.sh
  case arm.

Checked, not assumed
--------------------
Literal grep for each image finds nothing outside docker-builds.yml and
build.sh. Grep alone is not enough here because some workflows build
image names by interpolation, so I also checked every
`docker-image-name: ...${{` construction: dynamo-unittest and
inductor-unittest interpolate py${{ matrix.python-version }}-clang21,
and torchtitan interpolates cuda${{ stable-cuda }}-cudnn9-py3.12-gcc11.
Neither pattern can produce a -clang20 or an aarch64-cuda name, so
neither removal is reachable that way. Every other clang20 reference is
literal and points at the cuda13.0 or cuda13.4 variants in periodic.yml,
which stay.

docker-builds.yml still parses as YAML, build.sh passes bash -n, and no
ci-image reference in any workflow is left pointing at an image that is
no longer built.

Not included
------------
pytorch-linux-jammy-aarch64-py3.10-gcc13 is down to one consumer,
operator_benchmark.yml, and could be retired by pointing that at the
py3.11-gcc13 image this PR adds. That moves the operator_benchmark lane
to 3.11, which is the same class of call as the shared py3 image bumps
deferred in the first commit, so it is left for the lane owner.

Unrelated pre-existing gap spotted while verifying:
operator_microbenchmark_compare.yml references
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11, which docker-builds.yml
does not build -- true both before and after this change.
@atalman

atalman commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

Added the dead-image cleanup in a130e42. Verified the audit's two "DEAD" calls rather than taking them on trust, and both hold.

Removed

  • pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-clang20 — docker-builds.yml entry only; no build.sh case arm, it builds off the catch-all.
  • pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13 — docker-builds.yml matrix include and the build.sh case arm. Confirmed dead on upstream/main too, so it's pre-existing weight this PR didn't strand.

On the verification: literal grep isn't sufficient here, since several workflows build image names by interpolation. I checked every docker-image-name: ...${{ construction — dynamo-unittest and inductor-unittest interpolate py${{ matrix.python-version }}-clang21, and torchtitan interpolates cuda${{ stable-cuda }}-cudnn9-py3.12-gcc11. Neither pattern can produce a -clang20 or an aarch64-cuda name, so neither removal is reachable that way. Every other clang20 reference is literal and points at the cuda13.0 / cuda13.4 variants in periodic.yml, which stay.

docker-builds.yml still parses, build.sh passes bash -n, and no ci-image reference in any workflow now points at an image that isn't built.

Skipped item 3. aarch64-py3.10-gcc13 is down to one consumer (operator_benchmark.yml:88) and could be retired by pointing it at the py3.11-gcc13 image this PR adds — but that moves the operator_benchmark lane to 3.11, which is the same class of call as the shared py3 image bumps I deferred in the first commit. Leaving it to the lane owner; happy to fold it in if @huydhn prefers.

Good call on the rebuild-cost point — since this PR already touches build.sh, bundling the deletions here is free.

Unrelated gap spotted while verifying: operator_microbenchmark_compare.yml references pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11, which docker-builds.yml doesn't build. True both before and after this change, so pre-existing — flagging in case it's news.

pytorch-linux-noble-riscv64-py3.12-gcc14-cross-build
]
include:
- docker-image-name: pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13

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.

Hmm, this looks like a new aarch64 image added by @arjkesh a couple of days ago #197575, it is a wip, so maybe no CI jobs use it yet. We should just move it to 3.11

@arjkesh Could you help moving those aarch64 images to 3.11?

@atalman Once it's confirmed, let's keep this one then as we don't want to undo the WIP that NVIDIA is doing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch — you're right, and I've reverted that deletion. Restored at 3.11 in 7cb437e.

aarch64-cuda13.0-cudnn9-py3.10-gcc13 landed three days ago in #197575 (21f21b49b2d). It has no consumers because it's WIP, not because it's abandoned — deleting it would have undone in-flight NVIDIA work.

That's the flaw in the zero-references test that both the audit and my verification of it missed: "nothing references this" reads identically for an image that's finished with and one that hasn't been wired up yet. Checking when the definition was added, not just that nothing points at it, separates the two. I should have done that before removing it.

Rather than restore at 3.10 and leave the lane split, I took your suggestion across the whole aarch64 set:

image
aarch64-cuda13.0-cudnn9-py3.10-gcc13 → py3.11 (restored + bumped)
aarch64-py3.10-gcc13 → py3.11 (twin already added earlier in this PR, so the 3.10 case goes)
aarch64-py3.10-gcc13-inductor-benchmarks → py3.11
aarch64-cuda13.2-cudnn9-py3.12-gcc13 unchanged, already 3.12
aarch64-cuda13.4-cudnn9-py3.12-gcc13 unchanged, already 3.12

Consumers retargeted: operator_benchmark.yml and inductor-perf-test-nightly-aarch64.yml (including the py3_10 job ids in the latter) — so those two lanes move to 3.11 as well.

@arjkesh — heads-up that this bumps your new image to 3.11 and renames it to pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.11-gcc13, so whatever job you're wiring up should target the new name. Happy to drop that hunk if you'd rather land the wiring first and bump separately.

The cuda13.2-cudnn9-py3.10-clang20 removal from the previous commit stands — that one was genuinely stranded by this PR repointing its only consumer.

Verified: no aarch64 py3.10 reference left in .github or .ci, all five aarch64 images still built by docker-builds.yml, all touched workflows parse, build.sh passes bash -n.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @atalman, this works for me. I will open a separate change should we need to make changes to the cuda 13.0 image.

cc @nWEIdia

@nWEIdia nWEIdia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is 3.11 a must, or some images could use 3.12?

@atalman

atalman commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

hi @nWEIdia yes 3.11 is a minimum, we want to make sure there are no regression in minimum python build

Reverses the wrong half of the previous commit and finishes the aarch64
lane, per review.

pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13 is not dead
weight. It landed three days ago in pytorch#197575 (21f21b4, "[CI] Add ARM64
CUDA CI image definitions"), and has no consumers because it is WIP, not
because it was abandoned. Deleting it would have undone in-flight NVIDIA
work. Restored, at 3.11.

That is the flaw in the zero-references test that both the audit and my
verification of it missed: "nothing references this" reads the same for
an image that is finished with and one that has not been wired up yet.
Checking when a definition was *added*, not just that nothing points at
it, separates the two.

Rather than restore it at 3.10 and leave the lane split, the whole
aarch64 set is now consistent:

  aarch64-cuda13.0-cudnn9-py3.10-gcc13  -> py3.11   (restored, bumped)
  aarch64-py3.10-gcc13                  -> py3.11   (twin already added
                                                     earlier in this PR,
                                                     so the 3.10 case goes)
  aarch64-py3.10-gcc13-inductor-benchmarks -> py3.11
  aarch64-cuda13.2-cudnn9-py3.12-gcc13     unchanged (already 3.12)
  aarch64-cuda13.4-cudnn9-py3.12-gcc13     unchanged (already 3.12)

Consumers retargeted: operator_benchmark.yml and
inductor-perf-test-nightly-aarch64.yml, including the py3_10 job ids in
the latter. This moves those two lanes to 3.11, which is what the review
asked for.

The cuda13.2-cudnn9-py3.10-clang20 removal from the previous commit
stands -- that one was genuinely stranded by this PR repointing its only
consumer, and nobody objected to it.

Verified
--------
No aarch64 py3.10 reference remains anywhere in .github or .ci. All five
aarch64 images in build.sh are built by docker-builds.yml. All four
touched workflows parse as YAML and build.sh passes bash -n. The only
ci-image in the repo not built by docker-builds.yml is
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11 in
operator_microbenchmark_compare.yml, which was already in that state
before this PR.
@huydhn

huydhn commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Is 3.11 a must, or some images could use 3.12?

3.11 will be the min supported version for PyTorch in the near future. So, I would prefer that, but to be honest, 3.12 sounds ok though if there is a clear reason why it's needed. vLLM for example, is using 3.12.

@nWEIdia

nWEIdia commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Is 3.11 a must, or some images could use 3.12?

3.11 will be the min supported version for PyTorch in the near future. So, I would prefer that, but to be honest, 3.12 sounds ok though if there is a clear reason why it's needed. vLLM for example, is using 3.12.

Thanks, good to know.
NVIDIA NGC Containers are based on python 3.12 currently. Artifacts built out of these arm images (if based on 3.12) can be directly installed into NGC container for comparison/debugging purposes, but this is only a use case that is very specific.

docs_test on linux-jammy-py3.11-gcc11 fails before it runs a single doctest:

    File "docs/source/scripts/build_activation_images.py", line 9
      import matplotlib
    ModuleNotFoundError: No module named 'matplotlib'
    make: *** [Makefile:17: figures] Error 1

The marker sent 3.11 to matplotlib 3.5.3, which was released 2022-08-11 and
ships wheels for cp37 through cp310 only -- CPython 3.11 came out two months
later.  requires_python is >=3.7, so pip does not reject it; it falls back to a
source build that does not produce an importable module, and the image ends up
without matplotlib.  3.6.3 (2023-01-12) is the first release carrying a cp311
wheel, and is already what python >= 3.13 uses here.

Moving the boundary to 3.11 leaves python < 3.11 on 3.5.3 exactly as before.
It also moves 3.12 from 3.5.3 to 3.6.3; neither ships a cp312 wheel, so that
is no worse, and 3.6.3 is the newer of the two.
… had

docs_test on this PR's branch still fails with

    File "docs/source/scripts/build_activation_images.py", line 9
      import matplotlib
    ModuleNotFoundError: No module named 'matplotlib'

even after the matplotlib pin fix, because nothing installs the docs
requirements at all.  install_python.sh gates them:

    if [ -n "$DOCS" ]; then
      apt-get -y install expect-dev
      python -mpip install -r /opt/requirements-docs.txt
    fi

and pytorch-linux-jammy-py3.11-clang21 does not set DOCS.  The image this PR
moves off, pytorch-linux-jammy-py3.10-clang21, did.

KATEX is needed too, and its name undersells it: it gates install_docs_reqs.sh,
which installs node, yarn, katex, doxygen and lcov.  docs/source/conf.py loads
sphinxcontrib.katex with katex_prerender = True, so the katex binary has to be
on PATH or any page with math fails to build.

ONNX and GCC_VERSION are not for docs.  That image serves four configs -- ten
default shards, docs_test, jit_legacy and backwards_compat -- and all four moved
together, so this matches what the 3.10 image provided rather than trimming to
what docs alone needs.  TVM stays: the 3.11 image already carried it.

Verified with bash -n.  The image is already listed in docker-builds.yml, so it
rebuilds with the new flags on its own; no other file needs to change.
@atalman

atalman commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "looks good, lets merge"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Sep 25, 2026
Follows #198271 (pull, trunk) and #198501 (periodic, slow, periodic-strict), covering the 32 workflows those two did not touch.

## What moves

The inductor, rocm, h100, xpu, docs, dtensor, native-aot and microbenchmark families. Job ids, display names, `build-environment`, `needs` references, `${{ needs.<job>.* }}` interpolations and `python-version` all move together, following the convention the two earlier PRs established.

The only versioned image any of these workflows names is `pytorch-linux-jammy-py3.11-clang21`, which is already defined in `.ci/docker/build.sh` and listed in `docker-builds.yml`.

## Also: a guard that would have lost coverage silently

`.ci/pytorch/test.sh` gates a test on the build-environment *name*:

```bash
# Remove dill to test that serialization works without it
if [[ "$BUILD_ENVIRONMENT" == *py3.10-gcc11 ]]; then
  pip uninstall -y dill 2>/dev/null || true
fi
```

\#198271 renames that environment to `py3.11-gcc11` but does not touch this guard. Once it lands the branch stops matching, dill is never uninstalled, and the without-dill serialization coverage disappears — no failure, just a test that no longer runs. Fixed here since it is the same migration.

## Deliberately left alone

| file | why |
|---|---|
| `lint.yml` | needs `pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-linter`; `.ci/docker/build.sh` has no case for that tag, so the image cannot be built yet |
| `.github/scripts/test_trymerge.py` | `py3.10` appears in historical job names used as test fixtures |
| `linux_binary_build_workflow.yml.j2`, `_binary-test-macos.yml` | `py3_10` appears in comments and input descriptions about **binary** wheels. The binary matrix still ships 3.10 on the test and release channels; only nightly dropped it |
| `job-filter.yml` | the reference is inside a commented-out example |

## Verification

- All 32 workflows parse as YAML.
- Every `needs:` entry and every `${{ needs.<job>.* }}` interpolation resolves to a job defined in its own file — **0 dangling references**. That is the failure mode a blind rename produces, since job ids carry the version.
- `bash -n` clean on `test.sh`.
- The diff is symmetric at 357 insertions / 357 deletions, and mapping `3.11` back to `3.10` pairs every added line with a removed one — i.e. nothing changed but the version.

## Follow-up needed elsewhere

Three py3.11 images have no case in `.ci/docker/build.sh`:

```
pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-clang20
pytorch-linux-jammy-cuda13.4-cudnn9-py3.11-clang20
pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-linter
```

That is why `lint.yml` is excluded here. It also affects #198501, which renames `docker-image-name` to the two clang20 tags and updates `docker-builds.yml` to match — that PR will request images that cannot be built until `build.sh` defines them.

Pull Request resolved: #198531
Approved by: https://github.com/huydhn, https://github.com/jeffdaily
guilhermeleobas added a commit to guilhermeleobas/pytorch that referenced this pull request Oct 6, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
guilhermeleobas added a commit to guilhermeleobas/pytorch that referenced this pull request Oct 7, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in
> test/dynamo are unwrapped as well, keeping the 3.11+ branch.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
guilhermeleobas added a commit to guilhermeleobas/pytorch that referenced this pull request Oct 19, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in
> test/dynamo are unwrapped as well, keeping the 3.11+ branch.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to guilhermeleobas/pytorch that referenced this pull request Oct 19, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in
> test/dynamo are unwrapped as well, keeping the 3.11+ branch.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Oct 22, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (#198271, #198501, #198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull Request resolved: #199417
Approved by: https://github.com/rtimpe

Co-authored-by: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to guilhermeleobas/pytorch that referenced this pull request Oct 26, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in
> test/dynamo are unwrapped as well, keeping the 3.11+ branch.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to guilhermeleobas/pytorch that referenced this pull request Oct 27, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in
> test/dynamo are unwrapped as well, keeping the 3.11+ branch.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Oct 27, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (#198271, #198501, #198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull Request resolved: #199417
Approved by: https://github.com/rtimpe

Co-authored-by: Claude Opus 5.5 <[email protected]>
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 5, 2026
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10
> (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from
> torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the
> handlers and builders for opcodes that don't exist on 3.11+ (including the
> pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10
> block-stack exception handling, the lnotab writer, and remove_pointless_jumps,
> which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on
> 3.11+ doesn't change.
>
> get_framelocals_idx keeps its last-match lookup: its comment attributed
> duplicate localsplus names to <= 3.10, but Dynamo's resume functions still
> produce them on 3.11 (test_no_recompile_inner_function fails without it).
>
> This depends on requires-python being raised to >=3.11; don't merge it
> before that lands.
>
> Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the
> dynamo test files touching this code pass except for failures caused by the
> local environment (no LAPACK):
>
> ```
> uv pip install -e . -v --no-build-isolation
> python -m pytest test/dynamo/test_<name>.py -q   # 43 files, run in parallel
> ```
>
> Authored with Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull Request resolved: pytorch#199417
Approved by: https://github.com/rtimpe

Co-authored-by: Claude Opus 5.5 <[email protected]>
huydhn added a commit to huydhn/pytorch that referenced this pull request Nov 6, 2026
pull's linux-jammy-py3.11-clang21 and trunk's dynamo-unittest (3.11) run the
same dynamo_wrapped shards: same build environment, image and test.sh
function. The overlap started when pytorch#198271 moved pull from 3.10 to 3.11, while
dynamo-unittest had been added for 3.11+ because pull covered 3.10.

Keep the trunk copy and drop the pull one. Pull runs on every PR push, so this
saves more runner time (about 14,300 h a week over Oct 30 to Nov 6, against
about 9,200 h for dropping the trunk copy). 3.11 dynamo_wrapped still runs
before every merge through trunk, and pull keeps dynamo_wrapped on 3.14 and
3.14t. Trunk's dynamo-unittest jobs use their own test-times key, so their
sharding does not depend on the removed pull jobs.

Test Plan: CI. pull on this PR has no linux-jammy-py3.11-clang21 dynamo_wrapped
jobs; trunk still runs dynamo-unittest (3.11).

Authored with an AI assistant (Claude Code).
huydhn added a commit that referenced this pull request Nov 6, 2026
#198271 moved pull from py3.10 to py3.11 without noticing that trunk's
dynamo-unittest already ran py3.11 dynamo_wrapped, so the same shards ran twice
on every commit for six weeks. Nothing flagged it because no check compares
test configs across workflows.

WORKFLOWDUP collects (build-environment, test config, runner) from every
workflow that runs on a push to main or on a schedule, including the reusable
workflows they call, and fails when the same triple is in two of them. A build
job's test-matrix only counts when a test job reads it. Different runners count
as different configs, which keeps trunk's Graviton3 aarch64 shards (run for
SVE256 coverage) apart from pull's Graviton4 ones. periodic.yml's CUDA 13.2
default and distributed configs repeat trunk's on a schedule and are
allowlisted for now.

Test Plan:

```
PYTHONPATH=$(pwd) python3 -m pytest -q tools/test/test_workflow_duplicate_jobs_linter.py
uv run --python 3.11 --script tools/linter/adapters/workflow_duplicate_jobs_linter.py -- .github/workflows/pull.yml
```

The linter is clean on this stack and flags pull.yml's py3.11 and py3.14
dynamo_wrapped jobs when run against main's pull.yml.

Authored with an AI assistant (Claude Code).
huydhn added a commit that referenced this pull request Nov 6, 2026
#198271 moved pull from py3.10 to py3.11 without noticing that trunk's
dynamo-unittest already ran py3.11 dynamo_wrapped, so the same shards ran twice
on every commit for six weeks. Nothing flagged it because no check compares
test configs across workflows.

WORKFLOWDUP collects (build-environment, test config, runner) from every
workflow that runs on a push to main or on a schedule, including the reusable
workflows they call, and fails when the same triple runs from two of them. A reusable workflow
called from two such workflows counts twice. The 29 8 * * * schedule is not
counted, since filter_test_configs.py turns it into mem_leak_check and
rerun_disabled_tests runs. A build
job's test-matrix only counts when a test job reads it. Different runners count
as different configs, which keeps trunk's Graviton3 aarch64 shards (run for
SVE256 coverage) apart from pull's Graviton4 ones. periodic.yml's CUDA 13.2
default and distributed configs repeat trunk's on a schedule and are
allowlisted for now.

Test Plan:

```
PYTHONPATH=$(pwd) python3 -m pytest -q tools/test/test_workflow_duplicate_jobs_linter.py
uv run --python 3.11 --script tools/linter/adapters/workflow_duplicate_jobs_linter.py -- .github/workflows/pull.yml
```

The linter is clean on this stack. With main's pull.yml restored,
`lintrunner --take WORKFLOWDUP .github/workflows/pull.yml` flags its py3.11 and
py3.14 dynamo_wrapped jobs.

Authored with an AI assistant (Claude Code).
pytorchmergebot pushed a commit that referenced this pull request Nov 6, 2026
…3768)

## Summary (human written only)

This python version (3.11) is already running in trunk as part of https://github.com/pytorch/pytorch/blob/main/.github/workflows/dynamo-unittest.yml#L40. This saves about 3 h per PR push, 6.6 h per main commit and 14,300 runner-hours a week.

## Agent details (if applicable)

> Written with an AI assistant (Claude Code).
>
> - pull's `linux-jammy-py3.11-clang21` and trunk's `dynamo-unittest (3.11)` run the same dynamo_wrapped shards: same build environment, image and `test.sh` function. The overlap started when #198271 moved pull from 3.10 to 3.11.
> - This drops the pull copy. 3.11 dynamo_wrapped still runs before every merge through trunk, and pull keeps dynamo_wrapped on 3.14 and 3.14t.
> - Saves about 3 h per PR push, 6.6 h per main commit and 14,300 runner-hours a week (Oct 30 to Nov 6).

Pull Request resolved: #203768
Approved by: https://github.com/atalman, https://github.com/georgehong, https://github.com/albanD
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 9, 2026
…orch#203768)

## Summary (human written only)

This python version (3.11) is already running in trunk as part of https://github.com/pytorch/pytorch/blob/main/.github/workflows/dynamo-unittest.yml#L40. This saves about 3 h per PR push, 6.6 h per main commit and 14,300 runner-hours a week.

## Agent details (if applicable)

> Written with an AI assistant (Claude Code).
>
> - pull's `linux-jammy-py3.11-clang21` and trunk's `dynamo-unittest (3.11)` run the same dynamo_wrapped shards: same build environment, image and `test.sh` function. The overlap started when pytorch#198271 moved pull from 3.10 to 3.11.
> - This drops the pull copy. 3.11 dynamo_wrapped still runs before every merge through trunk, and pull keeps dynamo_wrapped on 3.14 and 3.14t.
> - Saves about 3 h per PR push, 6.6 h per main commit and 14,300 runner-hours a week (Oct 30 to Nov 6).

Pull Request resolved: pytorch#203768
Approved by: https://github.com/atalman, https://github.com/georgehong, https://github.com/albanD
huydhn added a commit that referenced this pull request Nov 26, 2026
#198271 moved pull from py3.10 to py3.11 without noticing that trunk's
dynamo-unittest already ran py3.11 dynamo_wrapped, so the same shards ran twice
on every commit for six weeks. Nothing flagged it because no check compares
test configs across workflows.

WORKFLOWDUP collects (build-environment, test config, runner) from every
workflow that runs on a push to main or on a schedule, including the reusable
workflows they call, and fails when the same triple runs from two of them. A reusable workflow
called from two such workflows counts twice. The 29 8 * * * schedule is not
counted, since filter_test_configs.py turns it into mem_leak_check and
rerun_disabled_tests runs. A build
job's test-matrix only counts when a test job reads it. Different runners count
as different configs, which keeps trunk's Graviton3 aarch64 shards (run for
SVE256 coverage) apart from pull's Graviton4 ones. periodic.yml's CUDA 13.2
default and distributed configs repeat trunk's on a schedule and are
allowlisted for now.

Test Plan:

```
PYTHONPATH=$(pwd) python3 -m pytest -q tools/test/test_workflow_duplicate_jobs_linter.py
uv run --python 3.11 --script tools/linter/adapters/workflow_duplicate_jobs_linter.py -- .github/workflows/pull.yml
```

The linter is clean on this stack. With main's pull.yml restored,
`lintrunner --take WORKFLOWDUP .github/workflows/pull.yml` flags its py3.11 and
py3.14 dynamo_wrapped jobs.

Authored with an AI assistant (Claude Code).
huydhn added a commit that referenced this pull request Nov 26, 2026
#198271 moved pull from py3.10 to py3.11 without noticing that trunk's
dynamo-unittest already ran py3.11 dynamo_wrapped, so the same shards ran twice
on every commit for six weeks. Nothing flagged it because no check compares
test configs across workflows.

WORKFLOWDUP collects (build-environment, test config, runner) from every
workflow that runs on a push to main or on a schedule, including the reusable
workflows they call, and fails when the same triple runs from two of them. A reusable workflow
called from two such workflows counts twice. The 29 8 * * * schedule is not
counted, since filter_test_configs.py turns it into mem_leak_check and
rerun_disabled_tests runs. A build
job's test-matrix only counts when a test job reads it. Different runners count
as different configs, which keeps trunk's Graviton3 aarch64 shards (run for
SVE256 coverage) apart from pull's Graviton4 ones. periodic.yml's CUDA 13.2
default and distributed configs repeat trunk's on a schedule and are
allowlisted for now.

Test Plan:

```
PYTHONPATH=$(pwd) python3 -m pytest -q tools/test/test_workflow_duplicate_jobs_linter.py
uv run --python 3.11 --script tools/linter/adapters/workflow_duplicate_jobs_linter.py -- .github/workflows/pull.yml
```

The linter is clean on this stack. With main's pull.yml restored,
`lintrunner --take WORKFLOWDUP .github/workflows/pull.yml` flags its py3.11 and
py3.14 dynamo_wrapped jobs.

Authored with an AI assistant (Claude Code).
huydhn added a commit that referenced this pull request Nov 26, 2026
#198271 moved pull from py3.10 to py3.11 without noticing that trunk's
dynamo-unittest already ran py3.11 dynamo_wrapped, so the same shards ran twice
on every commit for six weeks. Nothing flagged it because no check compares
test configs across workflows.

WORKFLOWDUP collects (build-environment, test config, runner) from every
workflow that runs on a push to main or on a schedule, including the reusable
workflows they call, and fails when the same triple runs from two of them. A reusable workflow
called from two such workflows counts twice. The 29 8 * * * schedule is not
counted, since filter_test_configs.py turns it into mem_leak_check and
rerun_disabled_tests runs. A build
job's test-matrix only counts when a test job reads it. Different runners count
as different configs, which keeps trunk's Graviton3 aarch64 shards (run for
SVE256 coverage) apart from pull's Graviton4 ones. periodic.yml's CUDA 13.2
default and distributed configs repeat trunk's on a schedule and are
allowlisted for now.

Test Plan:

```
PYTHONPATH=$(pwd) python3 -m pytest -q tools/test/test_workflow_duplicate_jobs_linter.py
uv run --python 3.11 --script tools/linter/adapters/workflow_duplicate_jobs_linter.py -- .github/workflows/pull.yml
```

The linter is clean on this stack. With main's pull.yml restored,
`lintrunner --take WORKFLOWDUP .github/workflows/pull.yml` flags its py3.11 and
py3.14 dynamo_wrapped jobs.

Authored with an AI assistant (Claude Code).
pytorchmergebot pushed a commit that referenced this pull request Nov 27, 2026
## Summary (human written only)

This is to prevent similar mistake of having duplicated test configs on CI.

## Agent details (if applicable)

> Written with an AI assistant (Claude Code).
>
> - Adds a `WORKFLOWDUP` linter that fails when the same test config (build environment, config, runner) runs in two workflows that test main (push to main or schedule), including reusable workflows like `dynamo-unittest`.
> - It would have caught the py3.11 dynamo_wrapped overlap fixed below in this stack when #198271 created it.
> - periodic's CUDA 13.2 default and distributed configs repeat trunk's on a schedule (~650 runner-hours a week) and are allowlisted for now.

Pull Request resolved: #203772
Approved by: https://github.com/georgehong, https://github.com/atalman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/docker ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants