hnlab / FAST

Fusion models for Atomic and molecular STructures (FAST)
MIT License
0 stars 0 forks source link

test_3dcnn_on_ampere #3

Closed zhuhui-in closed 2 years ago

zhuhui-in commented 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分钟

更换成cudatoolkit 11.0 pytorch 1.7.1 正常运行且耗时只需几秒。

@xuelianl @0ut0fcontrol

zhaofeng-shu33 commented 2 years ago

这个问题和你们实验室服务器的硬件平台有关吧。