Skip to content

Move the remaining py3.10 CI test jobs to 3.11 - #198531

Closed
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:move_rest_of_py310_to_py311
Closed

atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:move_rest_of_py310_to_py311

Conversation

@atalman

@atalman atalman commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

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:

# 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.

Follows pytorch#198271 (pull, trunk) and pytorch#198501 (periodic, slow, periodic-strict),
covering the 32 workflows those two did not touch: the inductor, rocm, h100,
xpu, docs, dtensor, native-aot and microbenchmark families.  Job ids, display
names, build-environment, needs references and python-version all move
together, following the convention those PRs established.

Also fixes .ci/pytorch/test.sh, which gates a test on the build-environment
name:

    # Remove dill to test that serialization works without it
    if [[ "$BUILD_ENVIRONMENT" == *py3.10-gcc11 ]]; then

pytorch#198271 renames that environment to py3.11-gcc11 but does not touch this
guard, so once it lands the branch stops matching, dill is never uninstalled
and the without-dill serialization coverage disappears silently -- no failure,
just a test that no longer runs.

Deliberately left alone:

- lint.yml, which 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, where py3.10 appears in historical job
  names used as test fixtures.
- .github/templates/linux_binary_build_workflow.yml.j2 and
  _binary-test-macos.yml, where 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, where the reference is inside a commented-out example.

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.

Verified: 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); test.sh passes bash -n; and the diff is symmetric at
357 insertions / 357 deletions with every added line pairing to a removed one
under a 3.11 -> 3.10 mapping, i.e. nothing changed but the version.
@atalman
atalman requested a review from a team as a code owner September 24, 2026 19:20
@pytorch-bot

pytorch-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ You can merge normally! (19 Unrelated Failures), 1 Unclassified Failure

As of commit a881931 with merge base f2e069a (image):

🟡 GREEN LIGHT - PR requires human review:

  • Scope
    • The diff exceeds the size cap the automated reviewer can read in full
    • The size gate declined it before any review ran, so nothing in it was examined
    • A human reviewer should assess this change

reason: scope_too_large
Reviewed commit: a881931

Inference job

🐛 Report a wrong verdict

NEW FAILURES SUPPRESSED BY AI (non-blocking) - The following jobs failed, but the AI CI Advisor judged the failures 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:

  • periodic / linux-jammy-cuda13.2-py3.10-gcc11 / test (distributed, 1, 3, lf-l-x86iavx512-45-172-t4-4) (gh) (this job did not run on the merge base, so DrCI cannot tell whether the failure is pre-existing)
    [runner-container-hooks] FATAL: received SIGINT

    AI verdict: AI verdict: probably not related

    The distributed 1/3 job was stopped by its 210-minute test-step timeout while every test was passing. On trunk the same shard already runs at about 211 minutes, and this run was on a different runner fleet (lf- instead of mt-). The suspect only renames py3.10 to py3.11 in workflows other than periodic.yml and moves the dill-uninstall guard, which has no plausible link to the distributed-test slowdown.

    Full reasoning on HUD →

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot Bot added the release notes: releng release notes category label Sep 24, 2026
@atalman atalman added ciflow/inductor ciflow/xpu Run XPU CI tasks ciflow/rocm-rx7900 Trigger "default" config CI on ROCm RX7900 Radeon (Navi31/gfx1100) GPUs labels Sep 24, 2026
@atalman atalman added ciflow/h100-distributed ciflow/dtensor Run DTensor specific tests labels Sep 24, 2026
@huydhn huydhn added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR labels Sep 24, 2026
@huydhn

huydhn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@claude Verify that all 3.10 jobs are migrated to 3.11 correctly, and there is no 3.10 CI jobs left after this

@claude

claude Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Claude finished @huydhn's task in 2m 55s —— View job


No. The job names are renamed cleanly, but most of these jobs will still run Python 3.10, and some CI jobs still say py3.10 after this PR. Nearly every renamed job uses a -py3- docker image, and .ci/docker/build.sh pins those images to 3.10. The python-version input doesn't install anything on Linux.

Details

Checklist

  • Check the PR diff is a pure version rename
  • Look for any 3.10 references left in .github/ and .ci/pytorch/
  • Check that needs and job references still resolve
  • Check which Python each job actually runs, using the docker image definitions in build.sh
  • Post findings

✅ The rename is correct

  • The 32 edited workflows have no 3.10, 3_10 or py310 left in them. The one remaining hit, nightly.yml:92, is an actions/setup-python step for the update-commit-hash job, not a test job.
  • Job ids, needs: and ${{ needs.<job>.* }} were renamed together, so no reference in the edited files points at a job that no longer exists.
  • The test.sh dill guard now matches pull.yml's linux-jammy-py3.11-gcc11, which uses pytorch-linux-jammy-py3.11-clang21 (really 3.11). That fix is correct.

❌ 1. Most renamed jobs still run Python 3.10

Setting python-version on _linux-build.yml / _linux-test.yml doesn't change the interpreter. It is passed to .github/actions/setup-linux, which declares the input and never reads it (the only inputs.python-version consumer under .github/actions/ is setup-win). On Linux the interpreter comes from the docker image, and the build.sh case table pins these images to 3.10:

image (used by the renamed jobs) ANACONDA_PYTHON_VERSION
pytorch-linux-jammy-cuda13.{0,2,4}-cudnn9-py3-gcc11 and cuda12.8-cudnn9-py3-gcc11 3.10
pytorch-linux-jammy-cuda13.{0,2,4}-cudnn9-py3-gcc11-inductor-benchmarks 3.10
pytorch-linux-jammy-py3-gcc11-inductor-benchmarks 3.10
pytorch-linux-jammy-rocm-n-py3, -rocm-n-py3-benchmarks (jammy branch, build.sh:228-229) 3.10
pytorch-linux-jammy-xpu-n-1-py3, pytorch-linux-noble-xpu-n-py3{,-client,-inductor-benchmarks} 3.10

build.sh:560-565 also checks that python --version matches ANACONDA_PYTHON_VERSION, so these images really are 3.10.

This affects all of inductor*.yml, h100-*.yml, test-h100.yml, dtensor.yml, native-aot.yml, xpu.yml, rocm-*.yml, *-rocm-mi200.yml, inductor-perf-*, *microbenchmark*, and the gcc11 / sm86 jobs in inductor-unittest.yml. After this PR, jobs named ...-py3.11-... will run 3.10, which is worse than the old names because the names are now wrong.

These jobs actually move to 3.11: docs-build.yml, nightly.yml docs, and td-holdout-unstable.yml. They use pytorch-linux-jammy-py3.11-clang21.

To really migrate, either:

  • bump ANACONDA_PYTHON_VERSION to 3.11 for the -py3- tags in build.sh. That is a docker rebuild, and it also moves every other user of those tags; or
  • add py3.11 image tags and point these workflows at them.

Either way the change is in .ci/docker/, so it triggers an image rebuild.

❌ 2. CI jobs still on 3.10 after this PR

where what covered elsewhere?
operator_benchmark.yml:52,59,74 x86-opbenchmark-build: build-environment: linux-jammy-py3.10-gcc11-build, python-version: "3.10", image py3-gcc11-inductor-benchmarks (3.10) No. Missed by all three PRs.
operator_benchmark.yml:94,109 aarch64 jobs pass python-version: "3.10" while the image and build-environment are already py3.11. The value only mislabels the job No
periodic.yml, slow.yml, periodic-strict.yml, docker-builds.yml many py3_10 jobs, plus the cuda13.x-cudnn9-py3.10-clang20 images #198501 (not landed). The PR body says build.sh has no case for the py3.11 clang20 tags; I also found no clang20 case at all, including the py3.10 tags docker-builds.yml:74,76 lists today, so that needs a look before #198501 lands.
lint.yml:61 cuda13.0-cudnn9-py3.10-linter Deliberately excluded (no py3.11 linter image)
_win-build.yml:156, _win-test.yml:174, .github/actions/setup-win/action.yml:12 Windows CI builds and tests run 3.10. setup-win defaults to 3.10, and _win-build / _win-test don't override it No. Not listed in the PR body
apply-lint, trymerge, tryrebase, revert, check_mergeability_ghstack, tools-unit-tests, weekly, nightly.yml:92 setup-python '3.10' for infra and bot jobs Not test jobs; can be changed separately
_binary-build-flash-attention-wheel-*, binary templates, build-triton-wheel 3.10 in the binary or release matrices Intentional

Minor

  • docs/source/community/viable_strict.md:35 still names trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (default).
  • Renaming job and build-environment strings changes the keys that HUD, perf dashboards and disabled-test or flaky-test matching use. Expect history to break at this commit for the renamed inductor and perf jobs.

Suggested next steps

  1. Decide how to actually move the -py3- images to 3.11 (finding 1). If they stay on 3.10 for now, keep the py3.10 names so the labels match what runs.
  2. Add operator_benchmark.yml to this PR. Fix this →
  3. Decide whether Windows CI (setup-win default and the PYTHON_VERSION in _win-build / _win-test) is part of "no 3.10 CI jobs left".

Note: I can't push changes under .github/workflows/ because the GitHub App doesn't have workflow permissions, so the fixes have to be made by hand. I also couldn't run the Python YAML checker in this sandbox; the reference checks above were done with grep.

@huydhn huydhn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stamped while waiting for CI signals. It looks like there are more 3.10 jobs to lift, but they can be done in subsequent PRs #198531 (comment)

@atalman

atalman commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "all 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

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/dtensor Run DTensor specific tests ciflow/h100-distributed ciflow/inductor ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/rocm-rx7900 Trigger "default" config CI on ROCm RX7900 Radeon (Navi31/gfx1100) GPUs ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks Merged release notes: releng release notes category

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants