No kernel image is available for execution on the device

Hello, I’ve been trying to install Pytorch CUDA on Windows 10 but I’ve had some problems.

I have an NVIDIA GeForce 920m with 425.31 Controller Version and CUDA 10.1.131 Drivers and therefore I installed CUDA 10.1 Toolkit

image

Using Python 3.7.9, I runned this line:

pip install torch==1.8.1+cu101 torchaudio==0.8.1 torchvision==0.9.1+cu101 -f https://download.pytorch.org/whl/cu101/torch_stable.html

And after all the setup, I only run on the code this:

device = torch.device("cuda:0")
torch.cuda.is_available() which returns True

And breaks in this line:

redent=torchtensor(entradas,dtype=tipo,device)

Returning: RuntimeError: CUDA error: no kernel image is available for execution on the device

I don’t know If I did something wrong in the setup or somewhere else

Your 920m should be a Kepler GPU with a compute capability of 3.5, which was dropped a few releases ago (I don’t know which one exactly, but it seems 1.8.1 already did not support it).
You could either downgrade to an even older PyTorch release, or try to build from source and add compute capability 3.5 explicitly.

I managed to install PyTorch 1.2.0 for CUDA 10 downloading the .whl file, thanks!