Cuda runtime error (48) ,how to solve this issue?

x=torch.rand(3,4)
y=torch.rand(3,4)
x=x.cuda()
y=y.cuda()
x+y
Traceback (most recent call last):
File “”, line 1, in
File “f:\Anaconda3\lib\site-packages\torch\tensor.py”, line 293, in add
return self.add(other)
RuntimeError: cuda runtime error (48) : no kernel image is available for execution on the device at d:\pytorch\pytorch\torch\lib\thc\generic/THCTensorMathPointwise.cu:301

Did you build from source? What’s your gpu?

Yes,I built from source,My gpu is Navidia 820m,cuda9.1,win10,vs2017

You are using a Fermi GPU with 2.1 compute capability, which is too old. PyTorch (along with many other DL libraries) requires >= 3.0.

1 Like