Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove CUDA 10.2-11.5 builds #1194

Merged
merged 2 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-conda-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: linux.2xlarge
strategy:
matrix:
cuda_version: ["10.2", "11.3", "11.5", "11.6", "11.7", "11.8", "cpu"]
cuda_version: ["11.6", "11.7", "11.8", "cpu"]
env:
CUDA_VERSION: ${{ matrix.cuda_version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-libtorch-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
cuda_version: ["11.7", "11.6", "11.5", "11.3", "10.2"]
cuda_version: ["11.7", "11.6"]
env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-magma-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: linux.2xlarge
strategy:
matrix:
cuda_version: ["118", "117", "116", "115"]
cuda_version: ["118", "117", "116"]
steps:
- name: Checkout PyTorch builder
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-manywheel-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
cuda_version: ["11.7", "11.6", "11.3"]
cuda_version: ["11.7", "11.6"]
env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
Expand Down
7 changes: 2 additions & 5 deletions analytics/validate_binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
PLATFORMS = ["osx-64", "linux-64", "win-64"]
PYTHON_VERSIONS = ["3.10", "3.9", "3.8", "3.7"]
CUDA_CUDNN_VERSION = [
("11.5", "8.3.2"), ("11.3", "8.2.0"), ("11.1", "8.0.5"), ("10.2", "7.6.5"), ("cpu", None)
("11.7", "8.5.0"), ("cpu", None)
]
CHANNEL = "pytorch-test"
VERSION = "1.11.*"
VERSION = "1.13.*"


def generate_expected_builds(platform: str) -> set:
Expand All @@ -22,9 +22,6 @@ def generate_expected_builds(platform: str) -> set:

for cuda_version, cudnn_version in CUDA_CUDNN_VERSION:
if platform == "win-64":
if cuda_version == "10.2":
# win does not support cuda 10.2
continue
cudnn_version = "8"

if cuda_version == "cpu":
Expand Down
175 changes: 0 additions & 175 deletions common/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,6 @@

set -ex

function install_102 {
echo "Installing CUDA 10.2 and CuDNN"
rm -rf /usr/local/cuda-10.2 /usr/local/cuda
# # install CUDA 10.2 in the same container
wget -q http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run
chmod +x cuda_10.2.89_440.33.01_linux.run
./cuda_10.2.89_440.33.01_linux.run --extract=/tmp/cuda
rm -f cuda_10.2.89_440.33.01_linux.run
mv /tmp/cuda/cuda-toolkit /usr/local/cuda-10.2
rm -rf /tmp/cuda
rm -f /usr/local/cuda && ln -s /usr/local/cuda-10.2 /usr/local/cuda

# install CUDA 10.2 CuDNN
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
mkdir tmp_cudnn && cd tmp_cudnn
wget -q http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn7-dev_7.6.5.32-1+cuda10.2_amd64.deb -O cudnn-dev.deb
wget -q http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn7_7.6.5.32-1+cuda10.2_amd64.deb -O cudnn.deb
ar -x cudnn-dev.deb && tar -xvf data.tar.xz
ar -x cudnn.deb && tar -xvf data.tar.xz
mkdir -p cuda/include && mkdir -p cuda/lib64
cp -a usr/include/x86_64-linux-gnu/cudnn_v7.h cuda/include/cudnn.h
cp -a usr/lib/x86_64-linux-gnu/libcudnn* cuda/lib64
mv cuda/lib64/libcudnn_static_v7.a cuda/lib64/libcudnn_static.a
ln -s libcudnn.so.7 cuda/lib64/libcudnn.so
chmod +x cuda/lib64/*.so
cp -a cuda/include/* /usr/local/cuda/include/
cp -a cuda/lib64/* /usr/local/cuda/lib64/
cd ..
rm -rf tmp_cudnn
ldconfig
}

function install_113 {
echo "Installing CUDA 11.3 and CuDNN 8.3"
rm -rf /usr/local/cuda-11.3 /usr/local/cuda
# install CUDA 11.3.1 in the same container
wget -q https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
chmod +x cuda_11.3.1_465.19.01_linux.run
./cuda_11.3.1_465.19.01_linux.run --toolkit --silent
rm -f cuda_11.3.1_465.19.01_linux.run
rm -f /usr/local/cuda && ln -s /usr/local/cuda-11.3 /usr/local/cuda

# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
mkdir tmp_cudnn && cd tmp_cudnn
wget -q https://developer.download.nvidia.com/compute/redist/cudnn/v8.3.2/local_installers/11.5/cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz -O cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
tar xf cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/include/* /usr/local/cuda/include/
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/lib/* /usr/local/cuda/lib64/
cd ..
rm -rf tmp_cudnn
ldconfig
}

function install_115 {
echo "Installing CUDA 11.5 and CuDNN 8.3"
rm -rf /usr/local/cuda-11.5 /usr/local/cuda
# install CUDA 11.5.0 in the same container
wget -q https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run
chmod +x cuda_11.5.0_495.29.05_linux.run
./cuda_11.5.0_495.29.05_linux.run --toolkit --silent
rm -f cuda_11.5.0_495.29.05_linux.run
rm -f /usr/local/cuda && ln -s /usr/local/cuda-11.5 /usr/local/cuda

# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
mkdir tmp_cudnn && cd tmp_cudnn
wget -q https://developer.download.nvidia.com/compute/redist/cudnn/v8.3.2/local_installers/11.5/cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz -O cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
tar xf cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/include/* /usr/local/cuda/include/
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/lib/* /usr/local/cuda/lib64/
cd ..
rm -rf tmp_cudnn
ldconfig
}

function install_116 {
echo "Installing CUDA 11.6 and CuDNN 8.3"
rm -rf /usr/local/cuda-11.6 /usr/local/cuda
Expand Down Expand Up @@ -139,101 +65,6 @@ function install_118 {
ldconfig
}

function prune_102 {
echo "Pruning CUDA 10.2 and CuDNN"
#####################################################################################
# CUDA 10.2 prune static libs
#####################################################################################
export NVPRUNE="/usr/local/cuda-10.2/bin/nvprune"
export CUDA_LIB_DIR="/usr/local/cuda-10.2/lib64"

export GENCODE="-gencode arch=compute_35,code=sm_35 -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"
export GENCODE_CUDNN="-gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -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"

if [[ -n "$OVERRIDE_GENCODE" ]]; then
export GENCODE=$OVERRIDE_GENCODE
fi

# all CUDA libs except CuDNN and CuBLAS (cudnn and cublas need arch 3.7 included)
ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \
| xargs -I {} bash -c \
"echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}"

# prune CuDNN and CuBLAS
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcudnn_static.a -o $CUDA_LIB_DIR/libcudnn_static.a
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a

#####################################################################################
# CUDA 10.2 prune visual tools
#####################################################################################
export CUDA_BASE="/usr/local/cuda-10.2/"
rm -rf $CUDA_BASE/libnsight $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2019.5.0 $CUDA_BASE/nsight-systems-2019.5.2

}

function prune_113 {
echo "Pruning CUDA 11.3 and CuDNN"
#####################################################################################
# CUDA 11.3 prune static libs
#####################################################################################
export NVPRUNE="/usr/local/cuda-11.3/bin/nvprune"
export CUDA_LIB_DIR="/usr/local/cuda-11.3/lib64"

export GENCODE="-gencode arch=compute_35,code=sm_35 -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"
export GENCODE_CUDNN="-gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -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"

if [[ -n "$OVERRIDE_GENCODE" ]]; then
export GENCODE=$OVERRIDE_GENCODE
fi

# all CUDA libs except CuDNN and CuBLAS (cudnn and cublas need arch 3.7 included)
ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \
| xargs -I {} bash -c \
"echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}"

# prune CuDNN and CuBLAS
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a

#####################################################################################
# CUDA 11.3 prune visual tools
#####################################################################################
export CUDA_BASE="/usr/local/cuda-11.3/"
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2021.1.0 $CUDA_BASE/nsight-systems-2021.1.3
}

function prune_115 {
echo "Pruning CUDA 11.5 and CuDNN"
#####################################################################################
# CUDA 11.3 prune static libs
#####################################################################################
export NVPRUNE="/usr/local/cuda-11.5/bin/nvprune"
export CUDA_LIB_DIR="/usr/local/cuda-11.5/lib64"

export GENCODE="-gencode arch=compute_35,code=sm_35 -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"
export GENCODE_CUDNN="-gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -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"

if [[ -n "$OVERRIDE_GENCODE" ]]; then
export GENCODE=$OVERRIDE_GENCODE
fi

# all CUDA libs except CuDNN and CuBLAS (cudnn and cublas need arch 3.7 included)
ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \
| xargs -I {} bash -c \
"echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}"

# prune CuDNN and CuBLAS
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a

#####################################################################################
# CUDA 11.5 prune visual tools
#####################################################################################
export CUDA_BASE="/usr/local/cuda-11.5/"
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2021.3.0 $CUDA_BASE/nsight-systems-2021.3.3
}

function prune_116 {
echo "Pruning CUDA 11.6 and CuDNN"
#####################################################################################
Expand Down Expand Up @@ -331,12 +162,6 @@ function prune_118 {
while test $# -gt 0
do
case "$1" in
10.2) install_102; prune_102
;;
11.3) install_113; prune_113
;;
11.5) install_115; prune_115
;;
11.6) install_116; prune_116
;;
11.7) install_117; prune_117
Expand Down
15 changes: 0 additions & 15 deletions conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ FROM base as cuda
RUN rm -rf /usr/local/cuda-*
ADD ./common/install_cuda.sh install_cuda.sh

FROM cuda as cuda10.2
RUN bash ./install_cuda.sh 10.2
ENV DESIRED_CUDA=10.2

FROM cuda as cuda11.3
RUN bash ./install_cuda.sh 11.3
ENV DESIRED_CUDA=11.3

FROM cuda as cuda11.5
RUN bash ./install_cuda.sh 11.5
ENV DESIRED_CUDA=11.5

FROM cuda as cuda11.6
RUN bash ./install_cuda.sh 11.6
ENV DESIRED_CUDA=11.6
Expand All @@ -74,9 +62,6 @@ ADD ./common/install_mnist.sh install_mnist.sh
RUN bash ./install_mnist.sh

FROM base as all_cuda
COPY --from=cuda10.2 /usr/local/cuda-10.2 /usr/local/cuda-10.2
COPY --from=cuda11.3 /usr/local/cuda-11.3 /usr/local/cuda-11.3
COPY --from=cuda11.5 /usr/local/cuda-11.5 /usr/local/cuda-11.5
COPY --from=cuda11.6 /usr/local/cuda-11.6 /usr/local/cuda-11.6
COPY --from=cuda11.7 /usr/local/cuda-11.7 /usr/local/cuda-11.7
COPY --from=cuda11.8 /usr/local/cuda-11.8 /usr/local/cuda-11.8
Expand Down
2 changes: 1 addition & 1 deletion conda/build_all_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -eou pipefail

TOPDIR=$(git rev-parse --show-toplevel)

for CUDA_VERSION in 11.8 11.7 11.6 11.5 11.3 10.2 cpu; do
for CUDA_VERSION in 11.8 11.7 11.6 cpu; do
CUDA_VERSION="${CUDA_VERSION}" conda/build_docker.sh
done
6 changes: 0 additions & 6 deletions conda/build_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,6 @@ else
elif [[ "$desired_cuda" == "11.6" ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=" - pytorch-cuda >=11.6,<11.7 # [not osx]"
export MAGMA_PACKAGE=" - magma-cuda116 # [not osx and not win]"
elif [[ "$desired_cuda" == "11.3" ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=" - cudatoolkit >=11.3,<11.4 # [not osx]"
export MAGMA_PACKAGE=" - magma-cuda113 # [not osx and not win]"
elif [[ "$desired_cuda" == "10.2" ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=" - cudatoolkit >=10.2,<10.3 # [not osx]"
export MAGMA_PACKAGE=" - magma-cuda102 # [not osx and not win]"
else
echo "unhandled desired_cuda: $desired_cuda"
exit 1
Expand Down
19 changes: 1 addition & 18 deletions conda/pytorch-nightly/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,7 @@ if [[ -n "$build_with_cuda" ]]; then
export TORCH_CUDA_ARCH_LIST="3.7+PTX;5.0"
export USE_STATIC_CUDNN=1 # links cudnn statically (driven by tools/setup_helpers/cudnn.py)

if [[ $CUDA_VERSION == 10* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5"
DEPS_LIST=(/usr/local/cuda-10.2/extras/CUPTI/lib64/libcupti.so.10.2)
elif [[ $CUDA_VERSION == 11.3* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
#for cuda 11.3 we use cudnn 8.3.2.44 https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html
#which does not have single static libcudnn_static.a deliverable to link with
export USE_STATIC_CUDNN=0
#for cuda 11.3 include all dynamic loading libraries
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-11.3/extras/CUPTI/lib64/libcupti.so.11.3)
elif [[ $CUDA_VERSION == 11.5* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
#for cuda 11.5 we use cudnn 8.3.2.44 https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html
#which does not have single static libcudnn_static.a deliverable to link with
export USE_STATIC_CUDNN=0
#for cuda 11.5 include all dynamic loading libraries
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-11.5/extras/CUPTI/lib64/libcupti.so.11.5)
elif [[ $CUDA_VERSION == 11.6* ]]; then
if [[ $CUDA_VERSION == 11.6* ]]; then
export TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
#for cuda 11.5 we use cudnn 8.3.2.44 https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html
#which does not have single static libcudnn_static.a deliverable to link with
Expand Down
12 changes: 0 additions & 12 deletions libtorch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ ADD ./common/install_conda.sh install_conda.sh
RUN bash ./install_conda.sh && rm install_conda.sh
RUN /opt/conda/bin/conda install -y cmake=3.18

FROM cuda as cuda10.2
RUN bash ./install_cuda.sh 10.2
RUN bash ./install_magma.sh 10.2

FROM cuda as cuda11.3
RUN bash ./install_cuda.sh 11.3
RUN bash ./install_magma.sh 11.3

FROM cuda as cuda11.5
RUN bash ./install_cuda.sh 11.5
RUN bash ./install_magma.sh 11.5

FROM cuda as cuda11.6
RUN bash ./install_cuda.sh 11.6
RUN bash ./install_magma.sh 11.6
Expand Down
2 changes: 1 addition & 1 deletion libtorch/build_all_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eou pipefail

TOPDIR=$(git rev-parse --show-toplevel)

for cuda_version in 11.7 11.6 11.5 11.3 10.2; do
for cuda_version in 11.7 11.6; do
GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/libtorch/build_docker.sh"
done

Expand Down
Loading