faster-rcnn.pytorch icon indicating copy to clipboard operation
faster-rcnn.pytorch copied to clipboard

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1532584813488/work/aten/src/THC/THCGeneral.cpp:74

Open guohaoyuan opened this issue 6 years ago • 8 comments

Thank you for this code, it's amazing! I've been learning about your project recently, but this error occurred at the beginning of the training. I thought the graphics card didn't match the driver. After trying it out, I found that it wasn't. ################################################## Loaded dataset voc_2007_trainval for training Set proposal method: gt Appending horizontally-flipped training examples... voc_2007_trainval gt roidb loaded from /home/ghy/faster-rcnn.pytorch-master/data/cache/voc_2007_trainval_gt_roidb.pkl done Preparing training data... done


before filtering, there are 10022 images... after filtering, there are 10022 images... 10022 roidb entries THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1532584813488/work/aten/src/THC/THCGeneral.cpp line=74 error=38 : no CUDA-capable device is detected Traceback (most recent call last): File "trainval_net.py", line 222, in im_data = im_data.cuda() RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1532584813488/work/aten/src/THC/THCGeneral.cpp:74

############################################### Does anyone know how to solve it?

guohaoyuan avatar Nov 29 '18 14:11 guohaoyuan

It has been solved. Reasons for not calling CUDA!

guohaoyuan avatar Nov 30 '18 02:11 guohaoyuan

Hi, I'm still seeing the same error. What was the solution for that?

yaelbrumer avatar Dec 10 '18 19:12 yaelbrumer

Hi, I'm still seeing the same error. What was the solution for that? 我的原因在:命令行需要修改GPU的参数,即,调用哪个GPU

guohaoyuan avatar Dec 20 '18 07:12 guohaoyuan

@guohaoyuan --cuda cuda:0 ?

kangkang59812 avatar May 04 '19 12:05 kangkang59812

One possible solution is to put the following two statements at the front of the code(trainval_net.py).

import os
os.environ["CUDA_VISIBLE_DEVICES"] = '0'

gmt710 avatar Oct 08 '19 02:10 gmt710

I'm still seeing the same error.

zzu0654 avatar Jul 19 '20 09:07 zzu0654

Hi I am also encountering similar issue, even after trying all the above solves. @zzu0654 were you able to solve it?

ShaheenPerveen avatar Dec 09 '20 10:12 ShaheenPerveen

Also getting the same error. My GPU is cross-verified and its active.

you can see the last thread here. https://github.com/rusty1s/pytorch_geometric/issues/2489

ahtsham58 avatar Apr 29 '21 15:04 ahtsham58