|
In Axii, there are modules for CUDA/cuDNN under deps/cuda/
. For example:
Each module corresponds to the combination of a specific CUDA version and a specific cuDNN version.
You can add such a module just as any Axii module. For example, for CUDA 10.1 / cuDNN 7.6:
Afterward, an axii upgrade
will install the requested CUDA/cuDNN. For this to work though, Axii relies on the configuration variable cuda_cudnn_archives_path
to point to a directory containing the downloaded archives and run scripts.
You should be prompted for a corresponding configuration by the CUDA module. On an H²T lab PC, for example, the following will configure Axii properly: axii config global cuda_cudnn_archives_path /common/share/archive/software/linux/cuda_cudnn
. Otherwise, you can mount the H2T archive and supply the corresponding path <archive>/software/linux/cuda_cudnn
.
You can also download the archives yourself from the NVIDIA website. The directory pointed to by axii config global cuda_cudnn_archives_path
is expected to look like this:
Axii does not activate any installed CUDA/cuDNN version automatically (e.g. by exporting CUDA_HOME
). This is required to allow you to use multiple versions in your workspace (e.g. for different projects).
Instead, Axii exports functions for activating and deactivating a specific CUDA/cuDNN combination into your workspace. For example:
Only use a
deactivate_cuda_*
function after calling the correspondingactivate_cuda_*
function.
These functions export a number of environment variables, including CUDA_HOME
, CUDA_TOOLKIT_ROOT_DIR
, PATH
and LD_LIBRARY_PATH
.
The scripts defining these functions are located in Axii at deps/cuda/scripts/activate_cuda_*.
If you need to activate a CUDA/cuDNN to run a specific executable, you can create a proxy script which activates it and calls the executable. For example: