CUDNN error while install pytorch from source

Hello everyone,

When I compile pytorch, an error occurred:

torch/csrc/cudnn/Conv.cpp:164:10: error: CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED was not declared in this scope

I used CUDNN v6 under home directory as apaszke said, and I also try as dpernes said, it does not work

can you post the full log of your command python setup.py install

I think it is possible that there is a /usr/local/cuda/include/cudnn.h which is older version and it is taking precedence over your version in home directory. can you remove /usr/local/cuda/include/cudnn.h if possible.

Hi, @smth, thanks for your response!

I think you are right, the cudnn.h is an old version, I check the cudnn.h, where I found the code:

#define CUDNN_MAJOR 5
#define CUDNN_MINOR 1
#define CUDNN_PATCHLEVEL 10

#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

and ‘/usr/local/cuda/lib64/libcudnn.so’ is linked to ‘libcudnn.so.5.1’

I am not a sudo user, is there any other way to handle it? Thank you.

It seems that current pytorch master is not compatible with CUDNN v5.1 (this instructions said it is OK with NVIDIA cuDNN v5.x or above), is it out of update?

Two options:

  1. You can override cuDNN paths and change ENV to use a local copy of newer cuDNN 7.
    Or,
  2. Use a Docker container from NVidia to build your PyTorch inside it. You can find latest containers here: https://hub.docker.com/r/nvidia/cuda/tags/

he tried the first path, the problem is CUDA path is already included, and so the CuDNN headers inside the CUDA include directory are being picked up.

@Chen-Wei_Xie maybe install CUDA to your home directory too, and specify CUDA_HOME=[path-to-cuda]

1 Like