Skip to content

Commit

Permalink
Move to CUDA 12.8 (#5793)
Browse files Browse the repository at this point in the history
Signed-off-by: Janusz Lisiecki <[email protected]>
  • Loading branch information
JanuszL authored Jan 30, 2025
1 parent a3f8ffa commit 13fef91
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmake/CUDA_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ elseif (${ARCH} MATCHES "aarch64")
# from the whole list/; "70" "75" "80" "86"
# we pick only major arch as minor should be compatible without JITing, it should
# shrink the output binary
set(CUDA_known_archs "70" "80" "90")
set(CUDA_known_archs "70" "80" "90" "100" "120")
else()
# from the whole list: "35" "50" "52" "60" "61" "70" "75" "80" "86"
# we pick only major arch as minor should be compatible without JITing, it should
# shrink the output binary
set(CUDA_known_archs "35" "50" "60" "70" "80" "90")
set(CUDA_known_archs "35" "50" "60" "70" "80" "90" "100" "120")
endif()

set(CUDA_TARGET_ARCHS ${CUDA_known_archs} CACHE STRING "List of target CUDA architectures")
Expand Down
29 changes: 29 additions & 0 deletions docker/Dockerfile.cuda128.aarch64.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG TOOLKIT_BASE_IMAGE=ubuntu:20.04
FROM ${TOOLKIT_BASE_IMAGE} as cuda

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux_sbsa.run && \
chmod +x cuda_*.run && \
./cuda_*.run --silent --no-opengl-libs --toolkit && \
rm -f cuda_*.run;

RUN NVJPEG2K_VERSION=0.8.1.40-1 && \
CUFILE_VERSION=1.13.0.11-1 && \
CUDA_VERSION_MAJOR=12 && \
CUDA_VERSION_MINOR=8 && \
apt-get update && \
apt-get install wget software-properties-common -y && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/3bf863cc.pub && \
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/ /" && \
apt-get update && \
apt-get install libnvjpeg2k0-dev-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libnvjpeg2k0-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libnvjpeg2k0-static-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} -y && \
cp /usr/include/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/include/ && \
cp /usr/lib/sbsa-linux-gnu/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/lib64/ && \
rm -rf /var/lib/apt/lists/*
38 changes: 38 additions & 0 deletions docker/Dockerfile.cuda128.x86_64.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ARG TOOLKIT_BASE_IMAGE=ubuntu:20.04
FROM ${TOOLKIT_BASE_IMAGE} as cuda

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y libxml2 curl perl gcc && \
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux.run && \
chmod +x cuda_*.run && \
./cuda_*.run --silent --no-opengl-libs --toolkit && \
rm -f cuda_*.run;

RUN NVJPEG2K_VERSION=0.8.1.40-1 && \
CUFILE_VERSION=1.13.0.11-1 && \
NVCOMP_VERSION=2.6.1 && \
CUDA_VERSION_MAJOR=12 && \
CUDA_VERSION_MINOR=8 && \
apt-get update && \
apt-get install wget software-properties-common -y && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" && \
apt-get update && \
apt-get install libnvjpeg2k0-dev-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libnvjpeg2k0-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libnvjpeg2k0-static-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} -y && \
cp /usr/include/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/include/ && \
cp /usr/lib/x86_64-linux-gnu/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/lib64/ && \
rm -rf /var/lib/apt/lists/* && \
mkdir nvcomp && \
cd nvcomp && \
wget https://developer.download.nvidia.com/compute/nvcomp/${NVCOMP_VERSION}/local_installers/nvcomp_${NVCOMP_VERSION}_x86_64_${CUDA_VERSION_MAJOR}.x.tgz && \
tar -xvf nvcomp*.tgz && \
cp -rv include/nvcomp* /usr/local/cuda/include/ && \
cp -v lib/*.so /usr/local/cuda/lib64/ && \
cd .. && \
rm -rf nvcomp
8 changes: 4 additions & 4 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ a build environment
To change build configuration please export appropriate env variables (for exact meaning please check the README):
PYVER=[default 3.8, required only by Run image]
CUDA_VERSION=[default 12.5, accepts also 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5 and 12.6]
CUDA_VERSION=[default 12.8, accepts also 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6 and 12.8]
NVIDIA_BUILD_ID=[default 12345]
CREATE_WHL=[default YES]
CREATE_RUNNER=[default NO]
Expand Down Expand Up @@ -40,17 +40,17 @@ shift $((OPTIND - 1))
export ARCH=${ARCH:-x86_64}
export PYVER=${PYVER:-3.8}
export PYV=${PYVER/./}
export CUDA_VERSION=${CUDA_VERSION:-12.6}
export CUDA_VERSION=${CUDA_VERSION:-12.8}
export CUDA_VER=${CUDA_VERSION//./}

if [ "${CUDA_VERSION%%\.*}" ]
then
if [ $CUDA_VER != "110" ] && [ $CUDA_VER != "111" ] && [ $CUDA_VER != "112" ] && [ $CUDA_VER != "113" ] && \
[ $CUDA_VER != "114" ] && [ $CUDA_VER != "115" ] && [ $CUDA_VER != "116" ] && [ $CUDA_VER != "117" ] && [ $CUDA_VER != "118" ] && \
[ $CUDA_VER != "120" ] && [ $CUDA_VER != "121" ] && [ $CUDA_VER != "122" ] && [ $CUDA_VER != "123" ] && [ $CUDA_VER != "124" ] && \
[ $CUDA_VER != "125" ] && [ $CUDA_VER != "126" ]
[ $CUDA_VER != "125" ] && [ $CUDA_VER != "126" ] && [ $CUDA_VER != "128" ]
then
echo "Wrong CUDA_VERSION=$CUDA_VERSION provided. Only 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5 and 12.6 are supported"
echo "Wrong CUDA_VERSION=$CUDA_VERSION provided. Only 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6 and 12.8 are supported"
exit 1
fi
else
Expand Down
5 changes: 3 additions & 2 deletions docs/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ Change directory (``cd``) into ``docker`` directory and run ``./build.sh``. If n
set the following environment variables:

* | CUDA_VERSION - CUDA toolkit version (11.8 and 12.4 are officially supported, 11.0,
11.1, 11.2, 11.4, 11.5, 11.6, 11.7, 12.0, 12.1, 12.2, 12.3, 12.4 and 12.5 are deprecated and may not work).
| The default is ``12.6``. Thanks to CUDA extended compatibility mode, CUDA 11.1, 11.2, 11.3, 11.4
11.1, 11.2, 11.4, 11.5, 11.6, 11.7, 12.0, 12.1, 12.2, 12.3, 12.4, 12.5 and 12.6 are deprecated
and may not work).
| The default is ``12.8``. Thanks to CUDA extended compatibility mode, CUDA 11.1, 11.2, 11.3, 11.4
11.5, 11.6, 11.7 and 11.8 wheels are named as CUDA 11.0 because it can work with the CUDA 11.0 R450.x driver
family. Same applies to CUDA 12.x. Please update to the latest recommended driver version in that family.
| If the value of the CUDA_VERSION is prefixed with `.` then any value ``.XX.Y`` can be passed,
Expand Down

0 comments on commit 13fef91

Please sign in to comment.