CUDA is made available in two ways:

  • Via dedicated cuda module
  • As part of the NVIDIA SDK which provides also the compiler (nvidia module)

Recommended CUDA version

The recommended CUDA version is the one matching the driver maximum capability, which currently is 12.8

The CUDA compute capability of this platform (GH200) is 9.0.

CUDA from Python

Note that If using CUDA through python packages such as PyTorch, pip will pull their own CUDA installation as a dependency.

Building with CUDA 

You can build programs with both GCC and NVIDIA Compilers. 

Building with GCC

Just load the cuda module on the right environment

module load prgenv/gnu cuda

Bulding with NVIDIA compilers

In most cases,  you may use the CUDA version provided as part of that NVIDIA SDK.

module load prgenv/nvidia

Depending on the software being built and how it finds the different CUDA and other dependencies, you may need to define:

export CUDA_HOME=$NVHPC_CUDA_HOME

If that is not enough, or you wish to use a different CUDA version, you may load the cuda module AFTER having loaded the NVIDIA compiler

ml prgenv/nvidia nvidia cuda