import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.backends.cudnn as cudnn

input = torch.randn(64, 3, 32, 32).cuda()
input_var = Variable(input)

cudnn.benchmark = True

net = nn.Conv2d(3, 24, kernel_size=3, stride=1,
                       padding=1, bias=False).cuda()

net.train()

output_var = net(input_var)

Finally found where the seg fault comes from! It’s because I set cudnn.benchmark = True. Do you have any idea on it?
FYI: I could run v0.12 with the flag cudnn.benchmark = True on the same computer, so the installed cudnn is supposed to not be the problem. Is it possible that something goes wrong when linking to the cudnn lib?
Thanks,
Danlu