Skip to content

Remove CUDA 11.7 builds #1408

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

Merged
merged 4 commits into from
Jun 21, 2023
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: ubuntu-22.04
strategy:
matrix:
cuda_version: ["11.7", "11.8", "12.1", "cpu"]
cuda_version: ["11.8", "12.1", "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-22.04
strategy:
matrix:
cuda_version: ["12.1", "11.8", "11.7"]
cuda_version: ["12.1", "11.8"]
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: ["121", "118", "117"]
cuda_version: ["121", "118"]
steps:
- name: Checkout PyTorch builder
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-magma-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
cuda_version: ["121", "118", "117"]
cuda_version: ["121", "118"]
config: ["Release", "Debug"]
env:
CUDA_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: ["12.1", "11.8", "11.7"]
cuda_version: ["12.1", "11.8"]
env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: ${{ matrix.cuda_version }}
Expand Down
64 changes: 0 additions & 64 deletions common/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,6 @@

set -ex

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
# install CUDA 11.7.0 in the same container
wget -q https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run
chmod +x cuda_11.7.0_515.43.04_linux.run
./cuda_11.7.0_515.43.04_linux.run --toolkit --silent
rm -f cuda_11.7.0_515.43.04_linux.run
rm -f /usr/local/cuda && ln -s /usr/local/cuda-11.7 /usr/local/cuda

# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
mkdir tmp_cudnn && cd tmp_cudnn
wget -q https://ossci-linux.s3.amazonaws.com/cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz -O cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
tar xf cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
cp -a cudnn-linux-x86_64-8.5.0.96_cuda11-archive/include/* /usr/local/cuda/include/
cp -a cudnn-linux-x86_64-8.5.0.96_cuda11-archive/lib/* /usr/local/cuda/lib64/
cd ..
rm -rf tmp_cudnn
ldconfig

# NCCL license: https://docs.nvidia.com/deeplearning/nccl/#licenses
mkdir tmp_nccl && cd tmp_nccl
wget -q https://developer.download.nvidia.com/compute/redist/nccl/v2.14/nccl_2.14.3-1+cuda11.7_x86_64.txz
tar xf nccl_2.14.3-1+cuda11.7_x86_64.txz
cp -a nccl_2.14.3-1+cuda11.7_x86_64/include/* /usr/local/cuda/include/
cp -a nccl_2.14.3-1+cuda11.7_x86_64/lib/* /usr/local/cuda/lib64/
cd ..
rm -rf tmp_nccl
ldconfig
}

function install_118 {
echo "Installing CUDA 11.8 and cuDNN 8.7 and NCCL 2.15"
rm -rf /usr/local/cuda-11.8 /usr/local/cuda
Expand Down Expand Up @@ -95,37 +64,6 @@ function install_121 {
ldconfig
}

function prune_117 {
echo "Pruning CUDA 11.7 and CuDNN"
#####################################################################################
# CUDA 11.7 prune static libs
#####################################################################################
export NVPRUNE="/usr/local/cuda-11.7/bin/nvprune"
export CUDA_LIB_DIR="/usr/local/cuda-11.7/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.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
}

function prune_118 {
echo "Pruning CUDA 11.8 and cuDNN"
#####################################################################################
Expand Down Expand Up @@ -192,8 +130,6 @@ function prune_121 {
while test $# -gt 0
do
case "$1" in
11.7) install_117; prune_117
;;
11.8) install_118; prune_118
;;
12.1) install_121; prune_121
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.7
RUN bash ./install_cuda.sh 11.7
ENV DESIRED_CUDA=11.7

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

FROM base as all_cuda
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
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 12.1 11.8 11.7 cpu; do
for CUDA_VERSION in 12.1 11.8 cpu; do
CUDA_VERSION="${CUDA_VERSION}" conda/build_docker.sh
done
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.8" ]]; then
export CONDA_CUDATOOLKIT_CONSTRAINT=" - pytorch-cuda >=11.8,<11.9 # [not osx]"
export MAGMA_PACKAGE=" - magma-cuda118 # [not osx and not win]"
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]"
else
echo "unhandled desired_cuda: $desired_cuda"
exit 1
Expand Down
4 changes: 0 additions & 4 deletions conda/pytorch-nightly/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +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=5.0;6.0;6.1;7.0;7.5;8.0;8.6
if "%desired_cuda%" == "11.7" (
set TORCH_CUDA_ARCH_LIST=%TORCH_CUDA_ARCH_LIST%;3.7+PTX
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
)
if "%desired_cuda%" == "11.8" (
set TORCH_CUDA_ARCH_LIST=%TORCH_CUDA_ARCH_LIST%;3.7+PTX;9.0
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="5.0;6.0;6.1;7.0;7.5;8.0;8.6"
export USE_STATIC_CUDNN=1 # links cudnn statically (driven by tools/setup_helpers/cudnn.py)

if [[ $CUDA_VERSION == 11.7* ]]; then
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;3.7+PTX"
#for cuda 11.7 we use cudnn 8.5
#which does not have single static libcudnn_static.a deliverable to link with
export USE_STATIC_CUDNN=0
#for cuda 11.7 include all dynamic loading libraries
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-11.7/extras/CUPTI/lib64/libcupti.so.11.7)
elif [[ $CUDA_VERSION == 11.8* ]]; then
if [[ $CUDA_VERSION == 11.8* ]]; then
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;3.7+PTX;9.0"
#for cuda 11.8 we use cudnn 8.7
#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.7
RUN bash ./install_cuda.sh 11.7
RUN bash ./install_magma.sh 11.7

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

Expand Down
17 changes: 4 additions & 13 deletions magma/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SHELL=/usr/bin/env bash

DESIRED_CUDA ?= 11.7
PACKAGE_NAME ?= magma-cuda117
CUDA_ARCH_LIST ?= -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86
DESIRED_CUDA ?= 11.8
PACKAGE_NAME ?= magma-cuda118
CUDA_ARCH_LIST ?= -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90

DOCKER_RUN = set -eou pipefail; docker run --rm -i \
-v $(shell git rev-parse --show-toplevel):/builder \
Expand All @@ -16,7 +16,6 @@ DOCKER_RUN = set -eou pipefail; docker run --rm -i \
.PHONY: all
all: magma-cuda121
all: magma-cuda118
all: magma-cuda117

.PHONY:
clean:
Expand All @@ -26,21 +25,13 @@ clean:
.PHONY: magma-cuda121
magma-cuda121: DESIRED_CUDA := 12.1
magma-cuda121: PACKAGE_NAME := magma-cuda121
magma-cuda121: CUDA_ARCH_LIST += -gencode arch=compute_90,code=sm_90
magma-cuda121:
$(DOCKER_RUN)

.PHONY: magma-cuda118
magma-cuda118: DESIRED_CUDA := 11.8
magma-cuda118: PACKAGE_NAME := magma-cuda118
magma-cuda118: CUDA_ARCH_LIST += -gencode arch=compute_37,code=sm_37 -gencode arch=compute_90,code=sm_90
magma-cuda118: CUDA_ARCH_LIST += -gencode arch=compute_37,code=sm_37
magma-cuda118:
$(DOCKER_RUN)

.PHONY: magma-cuda117
magma-cuda117: DESIRED_CUDA := 11.7
magma-cuda117: PACKAGE_NAME := magma-cuda117
magma-cuda117: CUDA_ARCH_LIST += -gencode arch=compute_37,code=sm_37
magma-cuda117:
$(DOCKER_RUN)

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.8 11.7; do
for cuda_version in 12.1 11.8; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure why 12.1 wasn't used here, but I added it and removed 11.7

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
20 changes: 3 additions & 17 deletions manywheel/build_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ if [[ $CUDA_VERSION == "12.1" ]]; then
export NCCL_INCLUDE_DIR="/usr/local/cuda/include/"
export NCCL_LIB_DIR="/usr/local/cuda/lib64/"
fi
elif [[ $CUDA_VERSION == "11.7" || $CUDA_VERSION == "11.8" ]]; then
elif [[ $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 All @@ -208,6 +208,7 @@ elif [[ $CUDA_VERSION == "11.7" || $CUDA_VERSION == "11.8" ]]; then
"/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, it links to more specific cuda version
"/usr/local/cuda/lib64/libnvrtc-builtins.so.11.8"
)
DEPS_SONAME+=(
"libcudnn_adv_infer.so.8"
Expand All @@ -222,23 +223,8 @@ elif [[ $CUDA_VERSION == "11.7" || $CUDA_VERSION == "11.8" ]]; then
"libcudart.so.11.0"
"libnvToolsExt.so.1"
"libnvrtc.so.11.2"
"libnvrtc-builtins.so.11.8"
)
if [[ $CUDA_VERSION == "11.7" ]]; then
DEPS_LIST+=(
"/usr/local/cuda/lib64/libnvrtc-builtins.so.11.7"
)
DEPS_SONAME+=(
"libnvrtc-builtins.so.11.7"
)
fi
if [[ $CUDA_VERSION == "11.8" ]]; then
DEPS_LIST+=(
"/usr/local/cuda/lib64/libnvrtc-builtins.so.11.8"
)
DEPS_SONAME+=(
"libnvrtc-builtins.so.11.8"
)
fi
else
echo "Using nvidia libs from pypi."
CUDA_RPATHS=(
Expand Down
58 changes: 0 additions & 58 deletions windows/cuda117.bat

This file was deleted.

3 changes: 0 additions & 3 deletions windows/internal/build_magma.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ if "%CUVER_NODOT%" == "121" (
if "%CUVER_NODOT%" == "118" (
set CUDA_ARCH_LIST= -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90
)
if "%CUVER_NODOT%" == "117" (
set CUDA_ARCH_LIST= -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86
)

set CC=cl.exe
set CXX=cl.exe
Expand Down
Loading