|
|
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.
Per default, this is set to /common/share/archive/software/linux/cuda_cudnn, which configures Axii properly for H²T lab PCs. If this does not match the path to the H²T archive on your PC, you can mount the H²T archive and supply the corresponding path <archive>/software/linux/cuda_cudnn. If you do not have access to this, you can set the path to any path you like using the following command: axii config --global cuda_cudnn_archives_path /path/to/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,PATHandLD_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: