cudaCheckError() failed : no kernel image is available for execution on the device

Getting this error while running yolov2 https://github.com/longcw/yolo2-pytorch
Ubuntu 16.04
cuda 8.0
python 3.6
pytorch 0.3.0.post4
gcc 5.4.0
gpu Quadro M1200

Installed PyTorch Linux binary compiled with cuda8 , using pip

Any ideas on what could be done to fix it?

It seems the error is thrown from the compiled kernels using nvcc in YOLO2 (line of code), not PyTorch directly.
Could you try so get -arch to -arch=sm_61, as it seems your M1200 is built using the Pascal architecture (doc).

1 Like

I 'm facing the same error here,
I’m using Titan Xp GPUs to run neural-motifs .
I have both cuda-10.0 and cuda-9.0 installed, but the driver is for cuda-10.0
Any idea?

1 Like

I have been facing this problem for two days since i am leaning pytorch by the Official Pytorch Tutorial. I am stopped at
y = torch.ones_like(x, device=device)
when python3.6 reported this cuda error.
I searched the internet and got no anwser.
That’s disappointing …

I am on CentOS 7 with a GT650M gpu and CUDA 10.1
nvidia-smi information:

SO, H!E!L!P! M!E!

Your GT650M has compute capability 3.0 based on this table, which isn’t supported anymore using the prebuilt binaries. You could build from source following this instruction.

1 Like

Thanks a lot, however, the guide of “Install from source” said,
“Once you have Anaconda installed, here are the instructions.”

I can’t find where are the instructions…:pensive:

Maybe from source means from rpm?

The instructions are in the following sentences:

If you want to compile with CUDA support, install
...

Just follow this passage and it should walk you through the install process. :wink:

Hi Cao. Were you able to fix this?

Actually, it was the problem when I compiled some file written in cuda.
Please check the followings:

  1. Pytorch is compiled in the same version with system cuda version
  2. Choose the true architecture code for your GPUs. For example, in this line https://github.com/rowanz/neural-motifs/blob/d05a251b705cedaa51599bf2906cfa4653b7a761/lib/fpn/nms/src/cuda/Makefile#L2, the GPU architecture is 61 for Titan Xp. You must change it into 52 for Geforce GTX Titan, or 75 for Titan V.
    Hope this helps.