Skip to content

Commit 07c00d1

Browse files
authored
Add doc for installing CUDA 12.4 (#1296)
Note that torch 2.4 supports CUDA 12.4
1 parent a827b8c commit 07c00d1

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

docs/source/installation/cuda-cudnn.rst

+77
Original file line numberDiff line numberDiff line change
@@ -692,3 +692,80 @@ The output should look like the following:
692692
Built on Tue_Feb__7_19:32:13_PST_2023
693693
Cuda compilation tools, release 12.1, V12.1.66
694694
Build cuda_12.1.r12.1/compiler.32415258_0
695+
696+
CUDA 12.4
697+
---------
698+
699+
You can use the following commands to install CUDA 12.4. We install it
700+
into ``/star-fj/fangjun/software/cuda-12.4.0``. You can replace it
701+
if needed.
702+
703+
.. code-block:: bash
704+
705+
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
706+
707+
chmod +x cuda_12.4.0_550.54.14_linux.run
708+
709+
./cuda_12.4.0_550.54.14_linux.run \
710+
--silent \
711+
--toolkit \
712+
--installpath=/star-fj/fangjun/software/cuda-12.4.0 \
713+
--no-opengl-libs \
714+
--no-drm \
715+
--no-man-page
716+
717+
Install cuDNN for CUDA 12.4
718+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
719+
720+
Now, install ``cuDNN`` for CUDA 12.4.
721+
722+
.. code-block:: bash
723+
724+
wget https://huggingface.co/csukuangfj/cudnn/resolve/main/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz
725+
726+
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
727+
728+
Set environment variables for CUDA 12.4
729+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
730+
731+
Note that we have to set the following environment variables after installing
732+
CUDA 11.8. You can save the following code to ``activate-cuda-12.4.sh``
733+
and use ``source activate-cuda-12.4.sh`` if you want to activate CUDA 12.4.
734+
735+
.. code-block:: bash
736+
737+
export CUDA_HOME=/star-fj/fangjun/software/cuda-12.4.0
738+
export PATH=$CUDA_HOME/bin:$PATH
739+
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
740+
export LD_LIBRARY_PATH=$CUDA_HOME/lib:$LD_LIBRARY_PATH
741+
export LD_LIBRARY_PATH=$CUDA_HOME/extras/CUPTI/lib64:$LD_LIBRARY_PATH
742+
export CUDAToolkit_ROOT_DIR=$CUDA_HOME
743+
export CUDAToolkit_ROOT=$CUDA_HOME
744+
745+
export CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME
746+
export CUDA_TOOLKIT_ROOT=$CUDA_HOME
747+
export CUDA_BIN_PATH=$CUDA_HOME
748+
export CUDA_PATH=$CUDA_HOME
749+
export CUDA_INC_PATH=$CUDA_HOME/targets/x86_64-linux
750+
export CFLAGS=-I$CUDA_HOME/targets/x86_64-linux/include:$CFLAGS
751+
export CUDAToolkit_TARGET_DIR=$CUDA_HOME/targets/x86_64-linux
752+
753+
To check that you have installed CUDA 12.4 successfully, please run:
754+
755+
.. code-block:: bash
756+
757+
which nvcc
758+
759+
nvcc --version
760+
761+
The output should look like the following:
762+
763+
.. code-block:: bash
764+
765+
/star-fj/fangjun/software/cuda-12.4.0/bin/nvcc
766+
767+
nvcc: NVIDIA (R) Cuda compiler driver
768+
Copyright (c) 2005-2024 NVIDIA Corporation
769+
Built on Tue_Feb_27_16:19:38_PST_2024
770+
Cuda compilation tools, release 12.4, V12.4.99
771+
Build cuda_12.4.r12.4/compiler.33961263_0

0 commit comments

Comments
 (0)