简体   繁体   English

PyTorch + CUDA 7.5 错误

[英]PyTorch + CUDA 7.5 error

I have non-sudo access to a machine with NVIDIA GPUs and CUDA 7.5 installed.我对安装了 NVIDIA GPU 和 CUDA 7.5 的机器具有非 sudo 访问权限。 I installed PyTorch with CUDA 7.5 support, which seems to have worked:我安装了支持 CUDA 7.5 的 PyTorch,这似乎奏效了:

>>> import torch
>>> torch.cuda.is_available()
True

To get some practice, I followed tutorial for machine translation using RNNs .为了得到一些练习,我遵循了使用 RNN 进行机器翻译的教程 When I set USE_CUDA = False and the CPUs are used, everything works quite alright.当我设置USE_CUDA = False并使用 CPU 时,一切正常。 However, when want to utilize the GPUs with USE_CUDA = True I get the following error:但是,当想要使用USE_CUDA = True的 GPU 时,我收到以下错误:

Traceback (most recent call last):
  ...
  File "seq2seq.py", line 229, in train
    encoder_output, encoder_hidden = encoder(input_variable[ei], encoder_hidden)
  File "/.../python2.7/site-packages/torch/nn/modules/module.py", line 206, in __call__
    result = self.forward(*input, **kwargs)
  File "seq2seq.py", line 144, in forward
    output, hidden = self.gru(embedded, hidden)
  File "/.../python2.7/site-packages/torch/nn/modules/module.py", line 206, in __call__
    result = self.forward(*input, **kwargs)
  File "/.../python2.7/site-packages/torch/nn/modules/rnn.py", line 91, in forward
    output, hidden = func(input, self.all_weights, hx)
  ...  
  File "/.../python2.7/site-packages/torch/backends/cudnn/rnn.py", line 42, in init_rnn_descriptor
    cudnn.DropoutDescriptor(handle, dropout_p, fn.dropout_seed)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: python: undefined symbol: cudnnCreateDropoutDescriptor
Exception AttributeError: 'python: undefined symbol: cudnnDestroyDropoutDescriptor' in <bound method DropoutDescriptor.__del__ of <torch.backends.cudnn.DropoutDescriptor object at 0x7fe540efec10>> ignored

I've tried to use Google to search for that error but got no meaningful results.我尝试使用 Google 搜索该错误,但没有得到任何有意义的结果。 Since I'm rather a newbie with PyTorch and CUDA, I have no idea how to go on from here.由于我是 PyTorch 和 CUDA 的新手,我不知道如何从这里继续。 The full setup is Ubuntu 14.04, Python 2.7, CUDA 7.5.完整的设置是 Ubuntu 14.04、Python 2.7、CUDA 7.5。

As stated in the comments: your error is with outdated CUDNN, and can be resolved by upgrading.如评论中所述:您的错误是过时的 CUDNN,可以通过升级解决。

Install current versions of CUDA, CUDNN, and PyTorch, then you'll be fine.安装当前版本的 CUDA、CUDNN 和 PyTorch,然后就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM