Skip to content

Move CI docker images off Python 3.10 - #199535

Closed
atalman wants to merge 2 commits into
pytorch:mainfrom
atalman:more_311_chnages
Closed

atalman wants to merge 2 commits into
pytorch:mainfrom
atalman:more_311_chnages

Conversation

@atalman

@atalman atalman commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in #198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10.

Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change:

cuda12.8-cudnn9-py3-gcc11
cuda13.2-cudnn9-py3-gcc11
cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks
cuda13.4-cudnn9-py3-gcc11
cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks
jammy-rocm-n-py3 (and -benchmarks)
jammy-xpu-n-1-py3
noble-xpu-n-py3 (and -client, -inductor-benchmarks)
py3-gcc11-inductor-benchmarks
py3-clang21-executorch
jammy-linter

The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11.

Two are deliberately left alone because they need more than a version bump:

pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already
exists, and the 3.10 image is only built by docker-builds.yml, never used by
a test job. It should be deleted, not renamed.

pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus
updates in docker-builds.yml and lint.yml.

Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds.

Made with AI, Claude

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98

Python 3.10 reaches EOL this month and was dropped from the nightly binary
build matrix in pytorch#198233, but 13 of the 31 images in .ci/docker/build.sh were
still pinned to it. Most did not say so: only two carry the version in their
tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28
workflow references -- were quietly 3.10.

Bumps the eleven whose tags do not encode a version, so no image is renamed and
no consumer has to change:

  cuda12.8-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks
  cuda13.4-cudnn9-py3-gcc11
  cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks
  jammy-rocm-n-py3 (and -benchmarks)
  jammy-xpu-n-1-py3
  noble-xpu-n-py3 (and -client, -inductor-benchmarks)
  py3-gcc11-inductor-benchmarks
  py3-clang21-executorch
  jammy-linter

The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11
for noble, and both are now 3.11.

Two are deliberately left alone because they need more than a version bump:

  pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already
  exists, and the 3.10 image is only built by docker-builds.yml, never used by
  a test job. It should be deleted, not renamed.

  pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus
  updates in docker-builds.yml and lint.yml.

Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x
still build CPython 3.10.1. Those feed release wheels, and test-infra still
lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing
it there would break 2.14/2.15 release builds.
@atalman
atalman requested a review from a team as a code owner October 2, 2026 17:39
@pytorch-bot

pytorch-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit c1f2565 with merge base 07a50f1 (image):

🟡 GREEN LIGHT - PR was reverted - re-landing requires human review:

Green Light will not review this PR again, on this or any later commit; re-landing it needs a human approval.

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.

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

LGTM!

@atalman atalman added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 2, 2026
@atalman

atalman commented Oct 2, 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

@pytorch-auto-revert

Copy link
Copy Markdown

@pytorchbot revert -m "Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable" -c autorevert

This PR is attributed to have caused regression in:

Autorevert dashboard as of 2026-10-02 21:10:05 UTC

Note: This revert was accelerated by the AI advisor: AI advisor: related (confidence=0.95)

Please investigate and fix the issues.
@claude Can you please read this revert comment, follow the links and read the errors, to then give a brief diagnostics on the cause of the error? If you judge the error to be legitimate reason for a revert, please provide brief guidance on how the author could fix it.

@claude

claude Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Claude finished @pytorch-auto-revert[bot]'s task in 47s —— View job


The revert is legitimate, but nothing actually broke. Compile time got faster, and the pr_time_benchmarks test fails when a benchmark improves by more than 10% just as it does when one slows down. To reland, update the expected results in the same PR.

Diagnostics and fix guidance

What failed

Job linux-jammy-cuda13.2-py3.11-gcc11 / test (pr_time_benchmarks) exited with code 1. The log has no REGRESSION lines. It does have about 25 WIN: failures, where instruction counts came in 10–18% below the values in benchmarks/dynamo/pr_time_benchmarks/expected_results.csv:

WIN: benchmark ('add_loop_inductor_gpu', 'compile_time_instruction_count') failed, actual result 23917983182 is -16.72% lower than expected 28720000000 ±10.00%
WIN: benchmark ('aotdispatcher_partitioner_cpu', 'compile_time_instruction_count') failed, actual result 7585221204 is -17.84% lower than expected 9232000000 ±10.00%
WIN: benchmark ('sum_floordiv_regression', 'compile_time_instruction_count') failed, actual result 3063449716 is -17.29% lower than expected 3704000000 ±10.00%
...

Why this PR caused it

This job runs in pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11, one of the images this PR moved from Python 3.10 to 3.11. The log confirms the new interpreter (/opt/python-3.11-venv/lib/python3.11/...). These benchmarks count instructions spent compiling in Dynamo, AOTAutograd and Inductor, which is mostly Python code. CPython 3.11 runs Python code noticeably faster, so the counts dropped by about 15% across the board. The pre-merge pr_time_benchmarks failure on this PR was marked "infra flaky", so the signal was missed before the force-merge.

How to fix

Reland with expected_results.csv regenerated in the same PR, so the image bump and the new baselines land together:

  1. Open the test results artifact from the failing job (or from a re-run on the reland PR) and take the full set of newly printed expected values.
  2. Following the log's instruction, update all entries that changed significantly in benchmarks/dynamo/pr_time_benchmarks/expected_results.csv, not just the ones that failed.
  3. Run ciflow/trunk on the reland PR and wait for pr_time_benchmarks to pass before merging; avoid merge -f this time.

Not checked: whether other benchmark or perf jobs on the bumped images (the *-inductor-benchmarks images) also have baselines tied to Python 3.10. Those may need similar updates.

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot added a commit that referenced this pull request Oct 2, 2026
This reverts commit 536d486.

Reverted #199535 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](#199535 (comment)))
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@atalman your PR has been successfully reverted.

@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Oct 2, 2026
pytorchmergebot added a commit that referenced this pull request Oct 3, 2026
This reverts commit 1d740a6.

Reverted #190440 on behalf of https://github.com/aorenste due to Breaks CUDA 13.2/13.4 and ROCm CI docker image builds: Triton 3.9 needs Python >= 3.11, but these images went back to Python 3.10 when #199535 was reverted ([comment](#190440 (comment)))
The pr_time_benchmarks job now runs on Python 3.11, which lowers
instruction counts by 10-36% across the board. Values taken from
the new_expected_results.csv printed by check_results.py in
https://github.com/pytorch/pytorch/actions/runs/37056561527/job/111013174909
@atalman

atalman commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

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

@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 Oct 9, 2026
…f float64 (#197547)

### Summary

Fixes #200245
Fixes: intel/torch-xpu-ops#5074
Related: intel/torch-xpu-ops#4313
Related: intel/torch-xpu-ops#2618

Removes the XPU `expectedFailure` for `TestCommon.test_numpy_ref` (`linalg.tensorinv`, `float64`) from the OpInfo in `torch/testing/_internal/opinfo/definitions/linalg.py`.

No `linalg.tensorinv` or XPU kernel code is changed. The XPU result was always correct. The `expectedFailure` was hiding a wrong **NumPy reference** in the PyTorch XPU CI environment, and that environment was fixed by #199535.

### Root cause

- `test_numpy_ref` compares `torch.linalg.tensorinv` on XPU against `np.linalg.tensorinv` computed on the CPU host.
- NumPy <= 1.23.x bundles OpenBLAS <= 0.3.20, which returns wrong results for LU-based routines (inv/solve/det) on Intel Xeon Sapphire Rapids and Granite Rapids CPUs (numpy/numpy#22502, fixed in OpenBLAS 0.3.21 / NumPy 1.24.0 via numpy/numpy#22525). Detailed analysis: intel/torch-xpu-ops#2618.
- PyTorch XPU CI images used Python 3.10, for which `.ci/docker/requirements-ci.txt` pins `numpy==1.23.2`, on affected host CPUs. As a result the reference was wrong and the test failed.
- The failure was originally attributed to PVC / oneMKL. That turned out to be incorrect: the deciding factor was the host CPU + NumPy/OpenBLAS version, not the GPU.

### Validation

Intel BMG:
```
python test_ops_xpu.py TestCommonXPU.test_numpy_ref_linalg_tensorinv_xpu_float64 -v
```
- before: FAILED (unexpected success)
- after: OK (complex128 variant also passes)

PyTorch XPU CI: rebased onto `viable/strict` 5de236d which includes #199535.

Pull Request resolved: #197547
Approved by: https://github.com/dvrogozh, https://github.com/BBBela, https://github.com/chuanqi129, https://github.com/atalman
cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in pytorch#198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10.

Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change:

  cuda12.8-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks
  cuda13.4-cudnn9-py3-gcc11
  cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks
  jammy-rocm-n-py3 (and -benchmarks)
  jammy-xpu-n-1-py3
  noble-xpu-n-py3 (and -client, -inductor-benchmarks)
  py3-gcc11-inductor-benchmarks
  py3-clang21-executorch
  jammy-linter

The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11.

Two are deliberately left alone because they need more than a version bump:

  pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already
  exists, and the 3.10 image is only built by docker-builds.yml, never used by
  a test job. It should be deleted, not renamed.

  pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus
  updates in docker-builds.yml and lint.yml.

Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds.

Made with AI, Claude
Pull Request resolved: pytorch#199535
Approved by: https://github.com/huydhn, https://github.com/Skylion007
cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
This reverts commit 536d486.

Reverted pytorch#199535 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#199535 (comment)))
cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
This reverts commit 1d740a6.

Reverted pytorch#190440 on behalf of https://github.com/aorenste due to Breaks CUDA 13.2/13.4 and ROCm CI docker image builds: Triton 3.9 needs Python >= 3.11, but these images went back to Python 3.10 when pytorch#199535 was reverted ([comment](pytorch#190440 (comment)))
cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in pytorch#198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10.

Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change:

  cuda12.8-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11
  cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks
  cuda13.4-cudnn9-py3-gcc11
  cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks
  jammy-rocm-n-py3 (and -benchmarks)
  jammy-xpu-n-1-py3
  noble-xpu-n-py3 (and -client, -inductor-benchmarks)
  py3-gcc11-inductor-benchmarks
  py3-clang21-executorch
  jammy-linter

The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11.

Two are deliberately left alone because they need more than a version bump:

  pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already
  exists, and the 3.10 image is only built by docker-builds.yml, never used by
  a test job. It should be deleted, not renamed.

  pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus
  updates in docker-builds.yml and lint.yml.

Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds.

Made with AI, Claude

Pull Request resolved: pytorch#199535
Approved by: https://github.com/huydhn, https://github.com/Skylion007
cyyever pushed a commit to BakeLab/pytorch that referenced this pull request Oct 11, 2026
…f float64 (pytorch#197547)

### Summary

Fixes pytorch#200245
Fixes: intel/torch-xpu-ops#5074
Related: intel/torch-xpu-ops#4313
Related: intel/torch-xpu-ops#2618

Removes the XPU `expectedFailure` for `TestCommon.test_numpy_ref` (`linalg.tensorinv`, `float64`) from the OpInfo in `torch/testing/_internal/opinfo/definitions/linalg.py`.

No `linalg.tensorinv` or XPU kernel code is changed. The XPU result was always correct. The `expectedFailure` was hiding a wrong **NumPy reference** in the PyTorch XPU CI environment, and that environment was fixed by pytorch#199535.

### Root cause

- `test_numpy_ref` compares `torch.linalg.tensorinv` on XPU against `np.linalg.tensorinv` computed on the CPU host.
- NumPy <= 1.23.x bundles OpenBLAS <= 0.3.20, which returns wrong results for LU-based routines (inv/solve/det) on Intel Xeon Sapphire Rapids and Granite Rapids CPUs (numpy/numpy#22502, fixed in OpenBLAS 0.3.21 / NumPy 1.24.0 via numpy/numpy#22525). Detailed analysis: intel/torch-xpu-ops#2618.
- PyTorch XPU CI images used Python 3.10, for which `.ci/docker/requirements-ci.txt` pins `numpy==1.23.2`, on affected host CPUs. As a result the reference was wrong and the test failed.
- The failure was originally attributed to PVC / oneMKL. That turned out to be incorrect: the deciding factor was the host CPU + NumPy/OpenBLAS version, not the GPU.

### Validation

Intel BMG:
```
python test_ops_xpu.py TestCommonXPU.test_numpy_ref_linalg_tensorinv_xpu_float64 -v
```
- before: FAILED (unexpected success)
- after: OK (complex128 variant also passes)

PyTorch XPU CI: rebased onto `viable/strict` 5de236d which includes pytorch#199535.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants