Update cudnn failed in PyTorch

I want to update the cudnn version from 7.5 to 7.6. However, after I update the cudnn, the pytorch still use the older version cudnn.

Here’s my updating steps:

  1. Download the libcudnn7_7.6.1.34-1+cuda10.0_amd64.deb from NVIDIA, and install it with sudo dpkg -i.
  2. I run cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2, I get:
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 1
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

It looks like I have cudnn 7.6.1.

HOWEVER, when I print the cudnn version in pytorch with torch.backends.cudnn.version(), I got 7402. What’s going on?

PyTorch is statically linked with cuDNN, so updating ‘cuDNN’ does not help here.

Building PyTorch from source is however, an option.

1 Like