Skip to content

Commit

Permalink
Add doc for installing CUDA 12.4 (#1296)
Browse files Browse the repository at this point in the history
Note that torch 2.4 supports CUDA 12.4
  • Loading branch information
csukuangfj authored Jul 23, 2024
1 parent a827b8c commit 07c00d1
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions docs/source/installation/cuda-cudnn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -692,3 +692,80 @@ The output should look like the following:
Built on Tue_Feb__7_19:32:13_PST_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0
CUDA 12.4
---------

You can use the following commands to install CUDA 12.4. We install it
into ``/star-fj/fangjun/software/cuda-12.4.0``. You can replace it
if needed.

.. code-block:: bash
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
chmod +x cuda_12.4.0_550.54.14_linux.run
./cuda_12.4.0_550.54.14_linux.run \
--silent \
--toolkit \
--installpath=/star-fj/fangjun/software/cuda-12.4.0 \
--no-opengl-libs \
--no-drm \
--no-man-page
Install cuDNN for CUDA 12.4
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Now, install ``cuDNN`` for CUDA 12.4.

.. code-block:: bash
wget https://huggingface.co/csukuangfj/cudnn/resolve/main/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz
tar xvf cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz --strip-components=1 -C /star-fj/fangjun/software/cuda-12.4.0
Set environment variables for CUDA 12.4
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note that we have to set the following environment variables after installing
CUDA 11.8. You can save the following code to ``activate-cuda-12.4.sh``
and use ``source activate-cuda-12.4.sh`` if you want to activate CUDA 12.4.

.. code-block:: bash
export CUDA_HOME=/star-fj/fangjun/software/cuda-12.4.0
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$CUDA_HOME/extras/CUPTI/lib64:$LD_LIBRARY_PATH
export CUDAToolkit_ROOT_DIR=$CUDA_HOME
export CUDAToolkit_ROOT=$CUDA_HOME
export CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME
export CUDA_TOOLKIT_ROOT=$CUDA_HOME
export CUDA_BIN_PATH=$CUDA_HOME
export CUDA_PATH=$CUDA_HOME
export CUDA_INC_PATH=$CUDA_HOME/targets/x86_64-linux
export CFLAGS=-I$CUDA_HOME/targets/x86_64-linux/include:$CFLAGS
export CUDAToolkit_TARGET_DIR=$CUDA_HOME/targets/x86_64-linux
To check that you have installed CUDA 12.4 successfully, please run:

.. code-block:: bash
which nvcc
nvcc --version
The output should look like the following:

.. code-block:: bash
/star-fj/fangjun/software/cuda-12.4.0/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0

0 comments on commit 07c00d1

Please sign in to comment.