Testing CUDA, cuDNN and convolutions

Now that Jupyter notebooks can be uploaded I thought I would share some code used to diagnose and validate my own installations. It is more sophisticated than previously posted by me in that it specifically tests for proper cuDNN initialisation by invoking the cuDNN convolution algorithm; the message “Failed to get convolution algorithm. This is probably because cuDNN failed to initialize” is a good diagnostic.

NB Of course, if you are only running with a CPU installation, this will probably not tell you anything useful (the Tensorflow model should run, just without GPU support)

“Share and Enjoy”

Update 20/02/2021

Attaching notebook version 2 with additional DLL checking.

CUDA & cuDNN Installation Testing V2.ipynb (22.4 KB)

CUDA & cuDNN Installation Testing.ipynb (15.8 KB)

Update I say in the notebook that TensorFlow performs various tests in import.

The source for that statement is here where it says:

Since TensorFlow 1.4, the self-check has been integrated with TensorFlow itself,
and any missing DLLs will be reported when you execute the import tensorflow
statement.

And I should clarify that the cuDNN error in particular and maybe dtypes error may be caused by Python environment misconfiguration/conflicts.

1 Like

Thanks a lot for sharing @JulianSMoore, this is great stuff!