Skip to content

Commit

Permalink
remove CUDA 11.6 builds (#1366)
Browse files Browse the repository at this point in the history
* remove CUDA 11.6 builds

* remove more 11.6 builds
  • Loading branch information
ptrblck committed Mar 29, 2023
1 parent 7b870ed commit 2432b6c
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 220 deletions.
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-22.04
strategy:
matrix:
cuda_version: ["11.8", "11.7", "11.6"]
cuda_version: ["11.8", "11.7"]
env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
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 @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
cuda_version: ["11.8", "11.7", "11.6"]
cuda_version: ["11.8", "11.7"]
env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
Expand Down
4 changes: 2 additions & 2 deletions CUDA_UPGRADE_GUIDE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Here is the supported matrix for CUDA and CUDNN

| CUDA | CUDNN | additional details |
| --- | --- | --- |
| 11.6 | 8.3.2.44 | Stable CUDA Release |
| 11.7 | 8.5.0.96 | Latest CUDA Release |
| 11.7 | 8.5.0.96 | Stable CUDA Release |
| 11.8 | 8.7.0.84 | Latest CUDA Release |


### B. Check the package availability
Expand Down
56 changes: 1 addition & 55 deletions common/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,6 @@

set -ex

function install_116 {
echo "Installing CUDA 11.6 and CuDNN 8.3"
rm -rf /usr/local/cuda-11.6 /usr/local/cuda
# install CUDA 11.6.2 in the same container
wget -q https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
chmod +x cuda_11.6.2_510.47.03_linux.run
./cuda_11.6.2_510.47.03_linux.run --toolkit --silent
rm -f cuda_11.6.2_510.47.03_linux.run
rm -f /usr/local/cuda && ln -s /usr/local/cuda-11.6 /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_117 {
echo "Installing CUDA 11.7 and CuDNN 8.5 and NCCL 2.14"
rm -rf /usr/local/cuda-11.7 /usr/local/cuda
Expand Down Expand Up @@ -116,37 +95,6 @@ function install_121 {
ldconfig
}

function prune_116 {
echo "Pruning CUDA 11.6 and CuDNN"
#####################################################################################
# CUDA 11.6 prune static libs
#####################################################################################
export NVPRUNE="/usr/local/cuda-11.6/bin/nvprune"
export CUDA_LIB_DIR="/usr/local/cuda-11.6/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.6 prune visual tools
#####################################################################################
export CUDA_BASE="/usr/local/cuda-11.6/"
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2022.1.1 $CUDA_BASE/nsight-systems-2021.5.2
}

function prune_117 {
echo "Pruning CUDA 11.7 and CuDNN"
#####################################################################################
Expand All @@ -172,7 +120,7 @@ function prune_117 {
$NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a

#####################################################################################
# CUDA 11.6 prune visual tools
# CUDA 11.7 prune visual tools
#####################################################################################
export CUDA_BASE="/usr/local/cuda-11.7/"
rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2022.2.0 $CUDA_BASE/nsight-systems-2022.1.3
Expand Down Expand Up @@ -244,8 +192,6 @@ function prune_121 {
while test $# -gt 0
do
case "$1" in
11.6) install_116; prune_116
;;
11.7) install_117; prune_117
;;
11.8) install_118; prune_118
Expand Down
5 changes: 0 additions & 5 deletions conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ ENV CUDA_HOME=/usr/local/cuda-${CUDA_VERSION}
# Make things in our path by default
ENV PATH=/usr/local/cuda-${CUDA_VERSION}/bin:$PATH

FROM cuda as cuda11.6
RUN bash ./install_cuda.sh 11.6
ENV DESIRED_CUDA=11.6

FROM cuda as cuda11.7
RUN bash ./install_cuda.sh 11.7
ENV DESIRED_CUDA=11.7
Expand All @@ -70,7 +66,6 @@ ADD ./common/install_mnist.sh install_mnist.sh
RUN bash ./install_mnist.sh

FROM base as all_cuda
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
COPY --from=cuda12.1 /usr/local/cuda-12.1 /usr/local/cuda-12.1
Expand Down
3 changes: 0 additions & 3 deletions conda/build_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,6 @@ else
elif [[ "$desired_cuda" == "11.7" ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=" - pytorch-cuda >=11.7,<11.8 # [not osx]"
export MAGMA_PACKAGE=" - magma-cuda117 # [not osx and not win]"
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]"
else
echo "unhandled desired_cuda: $desired_cuda"
exit 1
Expand Down
1 change: 0 additions & 1 deletion conda/pytorch-cuda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
version:
- 11.6
- 11.7
- 11.8
target_platform:
Expand Down
8 changes: 0 additions & 8 deletions conda/pytorch-cuda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
# https://conda.anaconda.org/pytorch/noarch/
# https://conda.anaconda.org/pytorch/noarch/repodata.json
{% set build = 3 %}
{% set cuda_constraints=">=11.6,<11.7" %}
{% set libcufft_constraints=">=10.7.0.55,<10.7.2.50" %}
{% set libcublas_constraints=">=11.8.1.74,<11.10.1.25" %}
{% set libcusolver_constraints=">=11.3.2.55,<11.3.5.50" %}
{% set libcusparse_constraints=">=11.7.1.55,<11.7.3.50" %}
{% set libnpp_constraints=">=11.6.0.55,<11.7.3.21" %}
{% set libnvjpeg_constraints=">=11.6.0.55,<11.7.2.34" %}
{% if version == '11.7' %}
{% set cuda_constraints=">=11.7,<11.8" %}
{% set libcufft_constraints=">=10.7.2.50,<10.9.0.58" %}
{% set libcublas_constraints=">=11.10.1.25,<11.11.3.6" %}
Expand Down
6 changes: 0 additions & 6 deletions conda/pytorch-nightly/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%desired_cuda%
set CUDA_BIN_PATH=%CUDA_PATH%\bin
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all
set TORCH_CUDA_ARCH_LIST=3.7+PTX;5.0;6.0;6.1;7.0;7.5;8.0;8.6
if "%desired_cuda%" == "11.5" (
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
)
if "%desired_cuda%" == "11.6" (
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
)
if "%desired_cuda%" == "11.7" (
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
)
Expand Down
9 changes: 1 addition & 8 deletions conda/pytorch-nightly/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@ if [[ -n "$build_with_cuda" ]]; then
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 == 11.6* ]]; then
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.6/extras/CUPTI/lib64/libcupti.so.11.6)
elif [[ $CUDA_VERSION == 11.7* ]]; then
if [[ $CUDA_VERSION == 11.7* ]]; then
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;6.0;6.1;7.0;7.5;8.0;8.6"
#for cuda 11.7 we use cudnn 8.5
#which does not have single static libcudnn_static.a deliverable to link with
Expand Down
4 changes: 0 additions & 4 deletions libtorch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +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 cuda11.6
RUN bash ./install_cuda.sh 11.6
RUN bash ./install_magma.sh 11.6

FROM cuda as cuda11.7
RUN bash ./install_cuda.sh 11.7
RUN bash ./install_magma.sh 11.7
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.8 11.7 11.6; do
for cuda_version in 11.8 11.7; do
GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/libtorch/build_docker.sh"
done

Expand Down
2 changes: 1 addition & 1 deletion manywheel/build_all_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MANYLINUX_VERSION=2014 GPU_ARCH_TYPE=cpu "${TOPDIR}/manywheel/build_docker.sh"

GPU_ARCH_TYPE=cpu-cxx11-abi "${TOPDIR}/manywheel/build_docker.sh"

for cuda_version in 11.7 11.6; do
for cuda_version in 11.8 11.7; do
GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/manywheel/build_docker.sh"
MANYLINUX_VERSION=2014 GPU_ARCH_TYPE=cuda GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/manywheel/build_docker.sh"
done
Expand Down
36 changes: 1 addition & 35 deletions manywheel/build_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,41 +108,7 @@ elif [[ "$OS_NAME" == *"Ubuntu"* ]]; then
LIBGOMP_PATH="/usr/lib/x86_64-linux-gnu/libgomp.so.1"
fi

if [[ $CUDA_VERSION == "11.6" ]]; then
export USE_STATIC_CUDNN=0
DEPS_LIST=(
"/usr/local/cuda/lib64/libcudart.so.11.0"
"/usr/local/cuda/lib64/libnvToolsExt.so.1"
"/usr/local/cuda/lib64/libnvrtc.so.11.2" # this is not a mistake for 11.6
"/usr/local/cuda/lib64/libnvrtc-builtins.so.11.6"
"/usr/local/cuda/lib64/libcudnn_adv_infer.so.8"
"/usr/local/cuda/lib64/libcudnn_adv_train.so.8"
"/usr/local/cuda/lib64/libcudnn_cnn_infer.so.8"
"/usr/local/cuda/lib64/libcudnn_cnn_train.so.8"
"/usr/local/cuda/lib64/libcudnn_ops_infer.so.8"
"/usr/local/cuda/lib64/libcudnn_ops_train.so.8"
"/usr/local/cuda/lib64/libcudnn.so.8"
"/usr/local/cuda/lib64/libcublas.so.11"
"/usr/local/cuda/lib64/libcublasLt.so.11"
"$LIBGOMP_PATH"
)
DEPS_SONAME=(
"libcudart.so.11.0"
"libnvToolsExt.so.1"
"libnvrtc.so.11.2"
"libnvrtc-builtins.so.11.6"
"libcudnn_adv_infer.so.8"
"libcudnn_adv_train.so.8"
"libcudnn_cnn_infer.so.8"
"libcudnn_cnn_train.so.8"
"libcudnn_ops_infer.so.8"
"libcudnn_ops_train.so.8"
"libcudnn.so.8"
"libcublas.so.11"
"libcublasLt.so.11"
"libgomp.so.1"
)
elif [[ $CUDA_VERSION == "11.7" || $CUDA_VERSION == "11.8" ]]; then
if [[ $CUDA_VERSION == "11.7" || $CUDA_VERSION == "11.8" ]]; then
export USE_STATIC_CUDNN=0
# Try parallelizing nvcc as well
export TORCH_NVCC_FLAGS="-Xfatbin -compress-all --threads 2"
Expand Down
58 changes: 0 additions & 58 deletions windows/cuda116.bat

This file was deleted.

28 changes: 0 additions & 28 deletions windows/internal/cuda_install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,12 @@ set CUDNN_LIB_FOLDER="lib\x64"
:: Skip all of this if we already have cuda installed
if exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" goto set_cuda_env_vars

if %CUDA_VER% EQU 116 goto cuda116
if %CUDA_VER% EQU 117 goto cuda117
if %CUDA_VER% EQU 118 goto cuda118

echo CUDA %CUDA_VERSION_STR% is not supported
exit /b 1

:cuda116

set CUDA_INSTALL_EXE=cuda_11.6.0_511.23_windows.exe
if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
curl -k -L "https://ossci-windows.s3.amazonaws.com/%CUDA_INSTALL_EXE%" --output "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
if errorlevel 1 exit /b 1
set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
set "ARGS=thrust_11.6 nvcc_11.6 cuobjdump_11.6 nvprune_11.6 nvprof_11.6 cupti_11.6 cublas_11.6 cublas_dev_11.6 cudart_11.6 cufft_11.6 cufft_dev_11.6 curand_11.6 curand_dev_11.6 cusolver_11.6 cusolver_dev_11.6 cusparse_11.6 cusparse_dev_11.6 npp_11.6 npp_dev_11.6 nvrtc_11.6 nvrtc_dev_11.6 nvml_dev_11.6"
)

set CUDNN_FOLDER=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive
set CUDNN_LIB_FOLDER="lib"
set "CUDNN_INSTALL_ZIP=%CUDNN_FOLDER%.zip"
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
if errorlevel 1 exit /b 1
set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
)

@REM Cuda 8.3+ required zlib to be installed on the path
echo Installing ZLIB dlls
curl -k -L "http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip" --output "%SRC_DIR%\temp_build\zlib123dllx64.zip"
7z x "%SRC_DIR%\temp_build\zlib123dllx64.zip" -o"%SRC_DIR%\temp_build\zlib"
xcopy /Y "%SRC_DIR%\temp_build\zlib\dll_x64\*.dll" "C:\Windows\System32"

goto cuda_common

:cuda117

set CUDA_INSTALL_EXE=cuda_11.7.0_516.01_windows.exe
Expand Down
3 changes: 0 additions & 3 deletions windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ set "CONDA_HOME=%CD%\conda"
set "tmp_conda=%CONDA_HOME%"
set "miniconda_exe=%CD%\miniconda.exe"
set "CONDA_EXTRA_ARGS=cpuonly -c pytorch-nightly"
if "%CUDA_VERSION%" == "116" (
set "CONDA_EXTRA_ARGS=pytorch-cuda=11.6 -c nvidia -c pytorch-nightly"
)
if "%CUDA_VERSION%" == "117" (
set "CONDA_EXTRA_ARGS=pytorch-cuda=11.7 -c nvidia -c pytorch-nightly"
)
Expand Down

0 comments on commit 2432b6c

Please sign in to comment.