General
The NVIDIA CUDA Toolkit provides a development environment for creating high-performance, GPU-accelerated applications. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler, and a runtime library.
The main binary is nvcc
, which is called a CUDA compiler driver. nvcc
accepts both C/C++ as well as CUDA code but needs a host compiler (typically gcc
or g++
from the GCC suite) for most applications. Further details on the nvcc
compilation process can be found here.
Lmod modules
ml av cuda
At the time of writing there are the following cuda versions (version X.Y.Z
means: major version X
, minor version Y
and bugfix version Z
) available:
Lmod module name |
---|
cuda/10.2 |
cuda/11.6.2 |
cuda/11.8.0 |
cuda/12.1.1 |
cuda/12.2.2 |
cuda/12.3.2 |
cuda/12.4.1 |
Do not specify the bugfix version number when loading the CUDA Toolkit
Usually, bugfix releases are installed close after release and replace the old releases. We therefore highly recommend to specify up to the minor version:
ml load cuda/12.2
However, due to backward compatibility, it is almost always safe to just specify the major version:
ml load cuda/12
CUDA Toolkit interoperability
While CUDA Toolkit from the 10.x series always required upgrading both, the Toolkit and the GPU driver, Nvidia introduced Minor Version Compatibility with it's 11.x and 12.x series. That means that, applications compiled with a CUDA Toolkit release from within a CUDA major release series will run (sometimes with limited feature-set, see caveat below) on systems having at least the minimum required driver version.
Caveat: Sometimes features introduced in a CUDA Toolkit version may actually span both the toolkit and the driver. In such cases an application that relies on features introduced in a newer version of the toolkit and driver may return the following error on older drivers: cudaErrorCallRequiresNewerDriver.
At the time of writing, the installed driver version on epyc-gpu Nodes is recent enough to run any version of the CUDA toolkit series up to version 12.x including all features.
And finally: The CUDA driver maintains backward compatibility to continue support of applications built on older toolkits, i.e. applications built with older CUDA toolkits will continue to run even with newer toolkits. For more details, have a look at the respective version of the Online Documentation.
Host Compiler compatibility
nvcc
of a specific CUDA Toolkit version is compatible with the following GCC and clang versions:
CUDA Toolkit | GCC | clang | icc |
---|---|---|---|
12.4 series | 6.x - 13.2 | 7.x - 17.0 | 2021.7 (intel/2022) |
12.3 series | 6.x - 12.2 | <=16 | 2021.7 (intel/2022) |
12.2 series | 6.x - 11.2 | <=15 | 2021.7 (intel/2022) |
12.1 series | 6.x - 11.2 | <=15 | 2021.7 (intel/2022) |
11.8 series | 6.x - 11.2 | <=14 | 2021.4 (intel/2021) |
11.6 series | 6.x - 11.2 | <=12 | 2021.4 (intel/2021) |
10.2 series | 4.4.7 - 8.x | <=8 | - |
Compatibility with HPC-SDK
Since the HPC-SDK brings its its own CUDA Toolkit versions incorporated, therefore loading nvhpc
and cuda
modules simultaneously is neither necessary nor allowed.
Compatibility with Intel compilers
While some Intel compiler versions are supported, the range is very narrow and has not been tested to work on LiCCA. Use with caution, but better use GCC compilers instead.
With Intel shifting away from their classic compilers to modern LLVM (clang) based compilers, the clang column applies for modern intel compilers (icx,icpx,ifx). In order to determine the underlying clang version, use icx -x c /dev/null -dM -E|grep clang