Skip to content

My GPU is not supported with the default dependencies

Cristian García edited this page Sep 2, 2021 · 1 revision

The GPUs have different specifications that, usually, need different requirements. Maybe, in the moment that you have tried to execute neural-document-aligner you have faced a message like "NVIDIA A100-PCIE-40GB with CUDA capability sm_80 is not compatible with the current PyTorch installation". If that is the case, the *default dependencies does not match your GPU requirements.

In order to have a correct environment which works with your GPU, you will need to install the correct and expected versions (including the kernel version! For instance, the linux-hwe from Ubuntu usually leads to unsupported CUDA configurations even with all the correct dependencies).

In the case of a GPU "NVIDIA A100-PCIE-40GB", you will need a correct configuration, since the default does not work. One possible configuration is:

  • Driver version: 470.57.02
  • CUDA toolkit version: 11.4
  • cuDNN 8.2.1

Once you have a correct configuration, you will need the correct dependencies for the specifications. In order to install the dependencies in an isolated environment, you can use Miniconda3:

# install Miniconda3 (interactive)
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

# add necessary channels
conda config --add channels conda-forge

# create your environment
conda create -n nda-environment python=3.8.5
conda activate nda-environment

# install, if you want, another toolkit version (this one will override the one of your system)
conda install cudatoolkit=11.1.1

# remove and install dependencies accordingly
pip uninstall torch # avoid duplicate dependencies, if needed
conda install -c pytorch pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0

This is a complete example for pytorch. Even if the cuDNN version does not match, it has been tested and it works correctly (in the moment of writing this entry, there was not pytorch version compatible with cuDNN 8.2 in the Anaconda repository). Of course, other configurations might work as well.

Clone this wiki locally