memo: Check Versions of CUDA and cuDNN

Table of contents

Via conda

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Check the version of the CUDA:
$ conda list cudatookit
# Name                    Version                   Build  Channel
cudatoolkit               10.1.243            h8cb64d8_10    conda-forge

$ conda list cudnn:
# Name                    Version                   Build  Channel
cudnn                     7.6.5.32             hc0a50b0_1    conda-forge

# install/update CUDA and CUDNN through conda:
$ conda install -c anaconda cudatoolkit
$ conda install -c anaconda cudnn


# show the highest supported CUDA version?
$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |

#
$ nvcc --version

Refer to 1; 3

Another way to check the version of cuDNN 4:

1
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2

Via PyTorch

1
2
3
import torch
print(torch.version.cuda)
>>> 10.2

Via TensorFlow

1
2
3
4
5
import tensorflow as tf

sys_details = tf.sysconfig.get_build_info()
cuda_version = sys_details["cuda_version"]
print(cuda_version)

Not quiet right. Refer to How to check CUDA version in TensorFlow - gcptutorials

Compatible combinations for TF

Refer to Docs; 2;

Compatible CUDA for cards

Determine the driver version first and then determine the cuda version. Genearlly, cuda is backward compatible with the driver. Nvidia-page

Ref

  1. searched by DDG: "What is the version of CUDA and cuDNN"
Built with Hugo
Theme Stack designed by Jimmy