RuntimeError: cuDNN error: CUDNN_ STATUS_ EXECUTION_ Failed solutions

when running pytorch gpu, reported this error

many people on the Internet also encountered this problem, some said that CUDA and cudnn version matching problem, some said that need to reinstall pytorch, CUDA, cudnn. I have checked the official website, the version is the match, trying to reinstall does not work, and I according to the version of another system can not install.

you can see that every time the error is in the file conv.py, which is the error made when doing the CNN operation.

The

solution is to introduce the following statement

import torch
torch.backends.cudnn.enabled = False

means you don’t need cudnn acceleration anymore.

GPU, CUDA, cudnn relationship is:

  • CUDA is a parallel computing framework launched by NVIDIA for its own GPU. CUDA can only run on NVIDIA gpus, and can only play the role of CUDA when the computing problem to be solved can be massively parallel computing.
  • cuDNN is an acceleration library for deep neural networks built by NVIDIA, and is a GPU acceleration library for deep neural networks. CuDNN isn’t a must if you’re going to use GPU to train models, but it’s usually used with this accelerator library.

reference: GPU, CUDA, cuDNN understanding

cudnn will be used by default. Since the matching problem cannot be solved at present, it is not used for now. The GPU will still work, but probably not as fast as cudNN.

if any friends know how to solve possible version problems, welcome to exchange ~

add:

  • version: win10, python 3.6, pytorch 1.1.0, CUDA 9.0, cudnn 7.1.4
  • test case: pytorch github Example Basic MNIST

Read More: