roytseng-tw / Detectron.pytorch

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
MIT License
2.82k stars 567 forks source link

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

Open 897051629 opened 5 years ago

897051629 commented 5 years ago

I donot know how to do this?

ozym4nd145 commented 5 years ago

This may be because you are not exposing CUDA environment variables during compilation (running make.sh), in my case, I needed to set:

CUDA_VISIBLE_DEVICES=0
LD_LIBRARY_PATH=/usr/local/cuda-80/lib64:$LD_LIBRARY_PATH
PATH=/usr/local/cuda-80/bin:$PATH

Also, do make sure that you are setting the correct architecture in build script ( in my case it was sm60 ).

eyildiz-ugoe commented 5 years ago

I fixed this error by removing the comment which was preventing my architecture (sm70) to be included in the build script.

fatihbaltaci commented 5 years ago

https://github.com/roytseng-tw/Detectron.pytorch/blob/1b1c4ba58428b7277a45b0dce6cc1bce3744b86a/lib/make.sh#L15

Uncomment this line. This is a compatibility issue for Turing architecture GPUs (e.g RTX20**). See:

https://docs.nvidia.com/cuda/turing-compatibility-guide/index.html

konstantin-frolov commented 4 years ago

Hi. I have same problem with pytorch 1.4.0, cudatoolkit 10.1 and Tesla K20c I downgraded pytorch, cudatoolkit and cuda drivers. I just uninstall pytorch, cudatoolkit and torchvision from conda conda uninstall pytorch cudatoolkit torchvision Reinstall drivers for Tesla with cuda version 10.1 Install Pytorch 1.2.0, cudatoolkit 10.0, torchvision 0.4.0 It's works for me.