Simple code to reproduce the problem:
import torch
import torch.nn as nn
ec=nn.Conv3d(1,1,3,2,1).cuda()
input=torch.autograd.Variable(torch.ones(1,1,511,512,512),requires_grad=True).cuda()
ec(input).sum().backward()

it raises:
RuntimeError: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.

Even if I add contiguous, it still doesn’t work.


if I change input to torch.ones(1,1,510,512,512), it works fine.


if I set requires_grad to False, It raise another error:


RuntimeError: CUDNN_STATUS_EXECUTION_FAILED

I don’t know much about cudnn, does anyone has any advice?
torch: 0.1.12_1
cudnn 5.1, cuda 8
tested in GTX1080 and Titan X