Closed zhuhui-in closed 2 years ago
import torch import torch.nn as nn ## cuda 10.2.89 ## pytorch 1.8.1 m = nn.Conv3d(16, 33, (3, 5, 2), stride=(2, 1, 1), padding=(4, 2, 0)) input = torch.randn(20, 16, 10, 50, 100) m = m.to(torch.device("cuda")) input = input.to(torch.device("cuda")) m(input)
报错:RuntimeError: Unable to find a valid cuDNN algorithm to run convolution 另外一个发现在m=m.to(torch.device("cuda")) 耗时20分钟
RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
m=m.to(torch.device("cuda"))
更换成cudatoolkit 11.0 pytorch 1.7.1 正常运行且耗时只需几秒。
cudatoolkit 11.0
pytorch 1.7.1
@xuelianl @0ut0fcontrol
这个问题和你们实验室服务器的硬件平台有关吧。
报错:
RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
另外一个发现在m=m.to(torch.device("cuda"))
耗时20分钟更换成
cudatoolkit 11.0
pytorch 1.7.1
正常运行且耗时只需几秒。@xuelianl @0ut0fcontrol