[BE] Drop CUDA < 12.6 support from CI/CD and raise the declared minimum (#192257)

`CUDA_ARCHES = ["12.6", "13.0", "13.2"]`, so nothing below 12.6 is built or
shipped any more. This removes the CI/CD leftovers and makes the minimum
explicit.

## Changes

| file | change |
|---|---|
| `cmake/public/cuda.cmake` | require CUDA **12.6**, was 12.1 |
| `.ci/docker/build.sh` | drop the `pytorch-linux-jammy-cuda12.4-cudnn9-py3-gcc11` image config |
| `.ci/docker/common/install_cuda.sh` | drop `install_124()` and its `12.4` dispatch arm |
| `.ci/docker/manywheel/Dockerfile_2_28` | `ARG BASE_CUDA_VERSION` default `11.8` → `12.6` |
| `docker.Makefile` | `CUDA_VERSION` `12.1.1` → `12.6.3`, `CUDA_VERSION_SHORT` `12.1` → `12.6` |
| `README.md` | Dockerfile prose said CUDA 12.1 |

### Notes on each

- **The 12.4 image config is orphaned.** `grep -rn "cuda12\.4" .github/ .ci/`
  returns only the definition in `build.sh` itself — no workflow and no
  `docker-builds.yml` entry ever requests it, so it has not been built. With it
  gone, `install_124()` has no remaining caller (verified: `grep -rn install_124`
  is empty after the change).
- **`docker.Makefile` was actively broken.** The 12.1 default made
  `CUDA_PATH = cu121`, and the Dockerfile installs torch from
  `download.pytorch.org/whl/$CUDA_PATH` — an index that no longer receives
  builds. 12.6.3 matches the version `install_126()` installs.
- **`ARG BASE_CUDA_VERSION=11.8`** was the only stale default in that file; the
  three other stages (`cuda`, `magma`, `cpu_final`) already default to 12.6.

## Scope

**Raising the cmake minimum narrows the source-build range**: building against
CUDA 12.1–12.5 now fails fast with `PyTorch requires CUDA 12.6 or above` instead
of compiling an untested configuration. That is the intended, user-visible part
of this change — flagging it explicitly for reviewers.

The **C++ `CUDA_VERSION` preprocessor guards are deliberately untouched.** There
are 34 such guard lines under 12060 in `aten/`, `torch/` and `c10/` (26 ×
`12040`, 4 × `12000`, 2 × `12030`, 1 × `12050`, 1 × `11060`). Removing those
branches touches kernel and runtime code and each site needs the correct branch
kept, so it belongs in its own reviewed change.

## Test plan

`bash -n` clean on both edited shell scripts. No dangling references to the
removed image config or install function. Nothing else in the tree selects CUDA
< 12.6.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/192257
Approved by: https://github.com/ngimel, https://github.com/tinglvv
This commit is contained in:
atalman authored and PyTorch MergeBot committed 2026-08-07 22:20:43 +00:00
1 parent bb96371605
commit 1e88a725f2
6 files changed
+6 -30

No files matched your search

-7
View File
@@ -91,13 +91,6 @@ fi
# configuration, so we hardcode everything here rather than do it
# from scratch
case "$tag" in
pytorch-linux-jammy-cuda12.4-cudnn9-py3-gcc11)
CUDA_VERSION=12.4
ANACONDA_PYTHON_VERSION=3.10
GCC_VERSION=11
KATEX=yes
TRITON=yes
;;
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11)
CUDA_VERSION=12.8.1
ANACONDA_PYTHON_VERSION=3.10
-17
View File
@@ -107,21 +107,6 @@ function install_cupti_headers {
echo "CUPTI ${cupti_version} headers installed to ${target_dir}."
}
function install_124 {
CUDNN_VERSION=9.1.0.70
CUSPARSELT_VERSION=0.6.2.3
echo "Installing CUDA 12.4.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-${CUSPARSELT_VERSION}"
install_cuda 12.4.1 cuda_12.4.1_550.54.15_linux
install_cudnn 12 $CUDNN_VERSION
CUDA_VERSION=12.4 bash install_nccl.sh
CUDA_VERSION=12.4 bash install_cusparselt.sh $CUSPARSELT_VERSION
ldconfig
}
function install_126 {
CUDNN_VERSION=9.10.2.21
CUSPARSELT_VERSION=0.7.1.0
@@ -257,8 +242,6 @@ function install_134 {
while test $# -gt 0
do
case "$1" in
12.4) install_124;
;;
12.6|12.6.*) install_126;
;;
12.8|12.8.*) install_128;
+1 -1
View File
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:experimental
ARG BASE_CUDA_VERSION=11.8
ARG BASE_CUDA_VERSION=12.6
ARG GPU_IMAGE=amd64/almalinux:8
FROM quay.io/pypa/manylinux_2_28_x86_64 as base
+1 -1
View File
@@ -423,7 +423,7 @@ should increase shared memory size either with `--ipc=host` or `--shm-size` comm
**NOTE:** Must be built with a Docker version >= 23.0
The Dockerfile is supplied to build images with CUDA 12.1 support and cuDNN v9.
The Dockerfile is supplied to build images with CUDA 12.6 support and cuDNN v9.
You can pass `PYTHON_VERSION=x.y` make variable to specify which Python version is to be used by Miniconda, or leave it
unset to use the default, as the Dockerfile uses system Python.
+2 -2
View File
@@ -70,8 +70,8 @@ endif()
message(STATUS "PyTorch: CUDA detected: " ${CUDA_VERSION})
message(STATUS "PyTorch: CUDA nvcc is: " ${CUDA_NVCC_EXECUTABLE})
message(STATUS "PyTorch: CUDA toolkit directory: " ${CUDA_TOOLKIT_ROOT_DIR})
if(CUDA_VERSION VERSION_LESS 12.1)
message(FATAL_ERROR "PyTorch requires CUDA 12.1 or above.")
if(CUDA_VERSION VERSION_LESS 12.6)
message(FATAL_ERROR "PyTorch requires CUDA 12.6 or above.")
endif()
if(CUDA_FOUND)
+2 -2
View File
@@ -8,8 +8,8 @@ $(warning WARNING: No docker user found using results from whoami)
DOCKER_ORG = $(shell whoami)
endif
CUDA_VERSION_SHORT ?= 12.1
CUDA_VERSION ?= 12.1.1
CUDA_VERSION_SHORT ?= 12.6
CUDA_VERSION ?= 12.6.3
CUDNN_VERSION ?= 9
BASE_RUNTIME = ubuntu:24.04
BASE_DEVEL = ubuntu:24.04