Repository navigation
Conversation
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.
🔗 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 FailureAs of commit 7596344 with merge base 0a2852d ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: 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. |
| 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, |
There was a problem hiding this comment.
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
|
@claude Check if we can clean up some Docker images for 3.10 if they are not in used in CI anymore |
|
Claude finished @huydhn's task in 9m 18s —— View job py3.10 Docker image cleanup audit
I checked all 8 Full audit of the 8 py3.10 images
Verification for the two dead ones (empty output = no reference outside 1.
|
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.
|
Added the dead-image cleanup in a130e42. Verified the audit's two "DEAD" calls rather than taking them on trust, and both hold. Removed
On the verification: literal grep isn't sufficient here, since several workflows build image names by interpolation. I checked every
Skipped item 3. Good call on the rebuild-cost point — since this PR already touches Unrelated gap spotted while verifying: |
| pytorch-linux-noble-riscv64-py3.12-gcc14-cross-build | ||
| ] | ||
| include: | ||
| - docker-image-name: pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
nWEIdia
left a comment
There was a problem hiding this comment.
Is 3.11 a must, or some images could use 3.12?
|
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.
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. |
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.
|
@pytorchmergebot merge -f "looks good, lets merge" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
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
> 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]>
> 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]>
> 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]>
> 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]>
> 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]>
> 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]>
> 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]>
> 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]>
> 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]>
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).
#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).
#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).
…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
…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
#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).
#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).
#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).
## 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
2.15 raises the minimum supported Python to 3.11, so move the
pullandtrunklanes off 3.10. Companion to #198233, which drops 3.10 from the nightly binary matrix.Renames job ids, job names,
build-environmentlabels andpython-versioninputs inpull.ymlandtrunk.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-clang21pytorch-linux-jammy-aarch64-py3.11-gcc13pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-clang20The aarch64 one needs an explicit case in
build.sh— the catch-all would not setACL/OPENBLAS. The clang20 one is fine on the catch-all, which is how its 3.10 counterpart is already built. Both are added todocker-builds.ymlso they're actually built and pushed.Worth a close look before merging. These carry a
py3.11label but point at unversionedpy3images whoseANACONDA_PYTHON_VERSIONis still 3.10:linux-jammy-rocm-py3.11pytorch-linux-jammy-rocm-n-py3linux-noble-xpu-n-py3.11pytorch-linux-noble-xpu-n-py3libtorch-linux-jammy-cuda13.2-py3.11-gcc11...cuda13.2-cudnn9-py3-gcc11linux-jammy-cuda13.2-py3.11-gcc11...cuda13.2-cudnn9-py3-gcc11linux-jammy-cuda13.2-py3.11-gcc11-no-ops...cuda13.2-cudnn9-py3-gcc11linux-jammy-py3.11-gcc11(verify-cachebench)...py3-gcc11-inductor-benchmarksCompleting these means bumping
ANACONDA_PYTHON_VERSIONon 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
pytorch-linux-*images referenced bypull.yml/trunk.ymlafter the rename resolve to somethingbuild.shcan build anddocker-builds.ymlbuilds. Verified programmatically, not by eye.pull.yml,trunk.yml,docker-builds.ymlall parse as YAML.build.shpassesbash -n.py3.10/py3_10references remain in either workflow.Note on
viable_strict.mdUpdated the
pullrequired-check name to match. Thetrunkline there already referencedlinux-jammy-cuda13.0-py3.10-gcc11, which doesn't exist intrunk.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