The CUDA Toolkit library
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
Description
CUDA Toolkit provides a development environment and a set of scientific libraries for creating GPU-accelerated applications. This environment includes highly optimised and GPU-accelerated functions for linear algebra and scientific applications such as BLAS, Fast Fourier Transforms, etc.
Some mathematical and linear algebra libraries provided by CUDA Toolkit:
- CuBLAS (CUDA Basic Linear Algebra Subroutines): Standard BLAS library, accelerated by GPUs.
- CuSPARSE: GPU-accelerated linear algebra functions for operations on sparse matrices.
- CuFFT (CUDA Fast Fourier Transform): GPU-accelerated FFT library.
- CuSOLVER: Solvers based on direct methods for dense and sparse systems.
Installed Versions
CUDA Toolkit is available via the module command. The installed versions on the machine can be found using the following command:
module avail cuda----------------------------------------------------cuda/9.2 cuda/10.1.1 cuda/10.2 cuda/11.7.1 cuda/12.0.0 cuda/12.2.0 cuda/12.6.3cuda/10.0 cuda/10.1.2 cuda/11.2 cuda/11.8.0 cuda/12.1.0 cuda/12.4.1 cuda/12.8.0-----------------------------------------------------
Environment
The different versions of CUDA do not depend on a particular environment (compilers).
CUDA versions prior to cuda/12.0.0 are not usable on the H100 partition gpu_p6.
To obtain information on the library access paths, you can use the following command:
module show cuda/12.1.0Usage
CUDA Toolkit is accessible via the module command.
To load the default version:
module load cuda
or to load a specific version:
module load cuda/10.0
Link Editing
After loading the CUDA module, it will be necessary during compilation to specify the library used by specifying the option:
-lcublasfor CuBLAS,-lcufftor-lcufftwfor CuFFT,-lcusparsefor CuSPARSE,-lcusolverfor CuSOLVER.
Using static versions requires adding the suffix _static, for example:
-lcublas_static to use the static version of CuBLAS.
Documentation
🌐 CUDA Reference Site
📝 CuFFT Reference Manual
📝 CuBLAS Reference Manual
📝 CuSPARSE Reference Manual
📝 CuSOLVER Reference Manual