Cublas runtime error : library not initialized at /data/users/soumith/builder/wheel/pytorch-src/torch/lib/THC/THCGeneral.c:383
Thank you
Dennis
I am also getting the same error when I run my code in multiple GPUs. But the error is not consistent, sometime I get it, sometime not.
wasiahmad
I am facing the same error. So is this related with machines that have multiple GPUs?
Yufeng_Ma
I think I’ve found the workaround. When we do .cuda(), we may specify the GPU device we want to load data or model to make sure they are on the same GPU.  For example, <SCODE>net = Net()
net = net.cuda( 0 )

input = Variable(torch.randn(1, 1, 32, 32))
input = input.cuda( 0 )
output = net(input)
<ECODE>
Yufeng_Ma
Rohith_AP
ShawnGuo
I’m also facing the same issue. Although I removed the cache files in .nv directory, same error would be raised when running my code.
ShawnGuo
Thanks!
ws123
any help ?
vince62s
CUDA_VISIBLE_DEVICES is 0-indexed. PyTorch is also 0-indexed.
smth
vince62s
Steven
lifematrix
I’m finetuning the vgg19_bn on my own dataset, and I faced the same problem too.
oneTaken
Thanks! It worked for me.
zjtgit
guoqiang_Wei
when I use pytorch 0.3, it works. But when I use 0.4 compiled from master, my code throws this error. remove nv doesn’t work.
tiantong
xypan1232
whats the source of this problem?
Brando_Miranda
is there not a way to set these indices globally once for everything?
Brando_Miranda
I think: <SCODE>export CUDA_VISIBLE_DEVICES=$i
<ECODE> is what Im looking for.
Brando_Miranda