在gpu上运行pyorch代码时出现cudnn错误

时间:2019-02-28 16:31:55

标签: pytorch

我有以下错误: 追溯(最近一次通话):

  File "odenet_mnist.py", line 343, in <module>
    logits = model(x)
  File "/home/subhashnerella/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/subhashnerella/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
    input = module(input)
  File "/home/subhashnerella/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/subhashnerella/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 320, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

这不是我的代码。我只是试图运行Chen等人最近发表的论文《神经常微分方程》的代码。 这是指向code的链接。

gpu:nvidia 2080Ti

pytorch版本:“ 1.0.1.post2”

cuda 9.0

python 3.7.2

cudnn:

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 4
#define CUDNN_PATCHLEVEL 2
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

我是pytorch的新手。为什么我会收到此错误,该如何解决?

1 个答案:

答案 0 :(得分:0)

RTX2080Ti需要CUDA10才能正常工作。安装包含CUDA10的PyTorch二进制文件