cuda runtime error(100)
aositeluofu opened this issue · comments
hello,I am learning deep learning right now.Thank you very much for you sharing.
However,I encoutered a mistake while running this code,and need some help.
When the code run "model.cuda( )"
it says"RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at ..\aten\src\THC\THCGeneral.cpp:50"
I am wondering whether you have ever encoutered something like this?
My cuda compiler version is 10.2.89.And the torchvision version matches the pytorch version.
Maybe for the version of PyTorch,and you can refer to some details such as “https://discuss.pytorch.org/t/runtimeerror-cuda-runtime-error-100-no-cuda-capable-device-is-detected-at-aten-src-thc-thcgeneral-cpp-50/66606/8“.
train.py 里面这一句# os.environ["CUDA_VISIBLE_DEVICES"]=opt.gpu 注释掉。然后在报错的前面加上print(torch.cuda.is_available())
似乎是因为cuda需要先检测才能用,不然就是默认没有装。
I don't know how to describe my solution in English……