
Table des matières
Jean Zay: The CUDA Toolkit library (CuFFT, CuBLAS, CuSPARSE, CuSOLVER, ...)
Introduction
The CUDA Toolkit offers a development environment and a set of scientific libraries to create accelerated applications by GPUs. This environment includes highly optimised and accelerated functions via GPU for linear algebra and scientific applications such as BLAS, Fast Fourier Transforms, etc.
Some of the mathematical and linear algebra libraries provided by the CUDA Toolkit:
- CuBLAS (CUDA Basic Linear Algebra Subroutines): Standard BLAS library accelerated by GPUs.
- CuSPARSE: linear algebra functions accelerated by GPUs for operations on sparse matrices.
- CuFFT (CUDA Fast Fourier Transform): FFT accelerated by GPUs.
- CuSOLVER: Solvers based on direct methods for dense and sparse systems.
Usage
The CUDA Toolkit is accessible via the module
command. For example:
$ module load cuda/10.0
Installed versions
It is possible to find the versions installed on Jean Zay via the module avail
command:
$ module avail cuda cuda/9.2 cuda/10.0 cuda/10.1.1
Linking
After the CUDA module is loaded, at the compilation it is necessary to specify which library is used by specifying the appropriate option:
-lcublas
for CuBLAS,-lcufft
or-lcufftw
for CuFFT,-lcusparse
for CuSPARSE,-lcusolver
for CuSOLVER.
The usage of static versions requires adding the suffix _static
:
For example, -lcublas_static
to use the static version of CuBLAS.