Skip to content

Commit 49e43bc

Browse files
Merge branch 'pytorch:main' into temp-gha-runner-v2
2 parents 0e4d8df + fa3c38c commit 49e43bc

File tree

456 files changed

+18807
-2057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+18807
-2057
lines changed

.ci/docker/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,30 @@ case "$tag" in
121121
TRITON=yes
122122
INDUCTOR_BENCHMARKS=yes
123123
;;
124+
pytorch-linux-jammy-cuda12.8-cudnn9-py3.12-gcc9-inductor-benchmarks)
125+
CUDA_VERSION=12.8.1
126+
CUDNN_VERSION=9
127+
ANACONDA_PYTHON_VERSION=3.12
128+
GCC_VERSION=9
129+
VISION=yes
130+
KATEX=yes
131+
UCX_COMMIT=${_UCX_COMMIT}
132+
UCC_COMMIT=${_UCC_COMMIT}
133+
TRITON=yes
134+
INDUCTOR_BENCHMARKS=yes
135+
;;
136+
pytorch-linux-jammy-cuda12.8-cudnn9-py3.13-gcc9-inductor-benchmarks)
137+
CUDA_VERSION=12.8.1
138+
CUDNN_VERSION=9
139+
ANACONDA_PYTHON_VERSION=3.13
140+
GCC_VERSION=9
141+
VISION=yes
142+
KATEX=yes
143+
UCX_COMMIT=${_UCX_COMMIT}
144+
UCC_COMMIT=${_UCC_COMMIT}
145+
TRITON=yes
146+
INDUCTOR_BENCHMARKS=yes
147+
;;
124148
pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9)
125149
CUDA_VERSION=12.6.3
126150
CUDNN_VERSION=9

.ci/docker/common/install_base.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ install_ubuntu() {
3636
# See https://github.com/pytorch/pytorch/issues/144768
3737
if [[ "$UBUNTU_VERSION" == "20.04"* && "$CUDA_VERSION" == "11.8"* ]]; then
3838
maybe_libnccl_dev="libnccl2=2.15.5-1+cuda11.8 libnccl-dev=2.15.5-1+cuda11.8 --allow-downgrades --allow-change-held-packages"
39-
elif [[ "$UBUNTU_VERSION" == "20.04"* && "$CUDA_VERSION" == "12.4"* ]]; then
40-
maybe_libnccl_dev="libnccl2=2.26.2-1+cuda12.4 libnccl-dev=2.26.2-1+cuda12.4 --allow-downgrades --allow-change-held-packages"
4139
else
4240
maybe_libnccl_dev=""
4341
fi

.ci/docker/common/install_cuda.sh

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ function install_118 {
5454
ldconfig
5555
}
5656

57-
function install_124 {
58-
CUDNN_VERSION=9.1.0.70
59-
echo "Installing CUDA 12.4.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.6.2"
60-
install_cuda 12.4.1 cuda_12.4.1_550.54.15_linux
61-
62-
install_cudnn 12 $CUDNN_VERSION
63-
64-
CUDA_VERSION=12.4 bash install_nccl.sh
65-
66-
CUDA_VERSION=12.4 bash install_cusparselt.sh
67-
68-
ldconfig
69-
}
70-
7157
function install_126 {
7258
CUDNN_VERSION=9.5.1.17
7359
echo "Installing CUDA 12.6.3 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.6.3"
@@ -113,40 +99,6 @@ function prune_118 {
11399
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2022.3.0 $CUDA_BASE/nsight-systems-2022.4.2/
114100
}
115101

116-
function prune_124 {
117-
echo "Pruning CUDA 12.4"
118-
#####################################################################################
119-
# CUDA 12.4 prune static libs
120-
#####################################################################################
121-
export NVPRUNE="/usr/local/cuda-12.4/bin/nvprune"
122-
export CUDA_LIB_DIR="/usr/local/cuda-12.4/lib64"
123-
124-
export GENCODE="-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90"
125-
export GENCODE_CUDNN="-gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90"
126-
127-
if [[ -n "$OVERRIDE_GENCODE" ]]; then
128-
export GENCODE=$OVERRIDE_GENCODE
129-
fi
130-
if [[ -n "$OVERRIDE_GENCODE_CUDNN" ]]; then
131-
export GENCODE_CUDNN=$OVERRIDE_GENCODE_CUDNN
132-
fi
133-
134-
# all CUDA libs except CuDNN and CuBLAS
135-
ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \
136-
| xargs -I {} bash -c \
137-
"echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}"
138-
139-
# prune CuDNN and CuBLAS
140-
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a
141-
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a
142-
143-
#####################################################################################
144-
# CUDA 12.4 prune visual tools
145-
#####################################################################################
146-
export CUDA_BASE="/usr/local/cuda-12.4/"
147-
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2024.1.0 $CUDA_BASE/nsight-systems-2023.4.4/
148-
}
149-
150102
function prune_126 {
151103
echo "Pruning CUDA 12.6"
152104
#####################################################################################
@@ -203,8 +155,6 @@ do
203155
case "$1" in
204156
11.8) install_118; prune_118
205157
;;
206-
12.4) install_124; prune_124
207-
;;
208158
12.6|12.6.*) install_126; prune_126
209159
;;
210160
12.8|12.8.*) install_128;

.ci/docker/common/install_cudnn.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ if [[ -n "${CUDNN_VERSION}" ]]; then
88
CUDNN_NAME="cudnn-linux-x86_64-9.8.0.87_cuda12-archive"
99
elif [[ ${CUDA_VERSION:0:4} == "12.6" ]]; then
1010
CUDNN_NAME="cudnn-linux-x86_64-9.5.1.17_cuda12-archive"
11-
elif [[ ${CUDA_VERSION:0:2} == "12" ]]; then
12-
CUDNN_NAME="cudnn-linux-x86_64-9.1.0.70_cuda12-archive"
1311
elif [[ ${CUDA_VERSION:0:2} == "11" ]]; then
1412
CUDNN_NAME="cudnn-linux-x86_64-9.1.0.70_cuda11-archive"
1513
else

.ci/docker/common/install_cusparselt.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ if [[ ${CUDA_VERSION:0:4} =~ ^12\.[5-8]$ ]]; then
1313
fi
1414
CUSPARSELT_NAME="libcusparse_lt-linux-${arch_path}-0.6.3.2-archive"
1515
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-${arch_path}/${CUSPARSELT_NAME}.tar.xz
16-
elif [[ ${CUDA_VERSION:0:4} == "12.4" ]]; then
17-
arch_path='sbsa'
18-
export TARGETARCH=${TARGETARCH:-$(uname -m)}
19-
if [ ${TARGETARCH} = 'amd64' ] || [ "${TARGETARCH}" = 'x86_64' ]; then
20-
arch_path='x86_64'
21-
fi
22-
CUSPARSELT_NAME="libcusparse_lt-linux-${arch_path}-0.6.2.3-archive"
23-
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-${arch_path}/${CUSPARSELT_NAME}.tar.xz
2416
elif [[ ${CUDA_VERSION:0:4} == "11.8" ]]; then
2517
CUSPARSELT_NAME="libcusparse_lt-linux-x86_64-0.4.0.7-archive"
2618
curl --retry 3 -OLs https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-x86_64/${CUSPARSELT_NAME}.tar.xz

.ci/docker/common/install_openblas.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
set -ex
55

66
cd /
7-
git clone https://github.com/OpenMathLib/OpenBLAS.git -b v0.3.29 --depth 1 --shallow-submodules
8-
7+
git clone https://github.com/OpenMathLib/OpenBLAS.git -b "${OPENBLAS_VERSION:-v0.3.29}" --depth 1 --shallow-submodules
98

109
OPENBLAS_BUILD_FLAGS="
1110
NUM_THREADS=128

.ci/docker/manywheel/Dockerfile_2_28_aarch64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ RUN git config --global --add safe.directory "*"
5858

5959
FROM base as openblas
6060
# Install openblas
61+
ARG OPENBLAS_VERSION
6162
ADD ./common/install_openblas.sh install_openblas.sh
6263
RUN bash ./install_openblas.sh && rm install_openblas.sh
6364

.ci/docker/manywheel/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fi
2727

2828
MANY_LINUX_VERSION=${MANY_LINUX_VERSION:-}
2929
DOCKERFILE_SUFFIX=${DOCKERFILE_SUFFIX:-}
30+
OPENBLAS_VERSION=${OPENBLAS_VERSION:-}
3031

3132
case ${image} in
3233
manylinux2_28-builder:cpu)
@@ -40,6 +41,7 @@ case ${image} in
4041
GPU_IMAGE=arm64v8/almalinux:8
4142
DOCKER_GPU_BUILD_ARG=" --build-arg DEVTOOLSET_VERSION=13 --build-arg NINJA_VERSION=1.12.1"
4243
MANY_LINUX_VERSION="2_28_aarch64"
44+
OPENBLAS_VERSION="v0.3.29"
4345
;;
4446
manylinuxcxx11-abi-builder:cpu-cxx11-abi)
4547
TARGET=final
@@ -115,6 +117,7 @@ tmp_tag=$(basename "$(mktemp -u)" | tr '[:upper:]' '[:lower:]')
115117
DOCKER_BUILDKIT=1 docker build \
116118
${DOCKER_GPU_BUILD_ARG} \
117119
--build-arg "GPU_IMAGE=${GPU_IMAGE}" \
120+
--build-arg "OPENBLAS_VERSION=${OPENBLAS_VERSION}" \
118121
--target "${TARGET}" \
119122
-t "${tmp_tag}" \
120123
$@ \

.ci/manywheel/build_cuda.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ if [[ $CUDA_VERSION == 12* ]]; then
167167
'$ORIGIN/../../nvidia/cusparse/lib'
168168
'$ORIGIN/../../cusparselt/lib'
169169
'$ORIGIN/../../nvidia/nccl/lib'
170+
'$ORIGIN/../../nvidia/nvshmem/lib'
170171
'$ORIGIN/../../nvidia/nvtx/lib'
171172
'$ORIGIN/../../nvidia/cufile/lib'
172173
)

.ci/pytorch/smoke_test/check_gomp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def get_gomp_thread():
4646

4747
# use the default gomp path of AlmaLinux OS
4848
libgomp_path = "/usr/lib64/libgomp.so.1"
49+
# if it does not exist, try Ubuntu path
50+
if not os.path.exists(libgomp_path):
51+
libgomp_path = f"/usr/lib/{os.uname().machine}-linux-gnu/libgomp.so.1"
4952

5053
os.environ["GOMP_CPU_AFFINITY"] = "0-3"
5154

0 commit comments

Comments
 (0)