Closed ksharm50 closed 5 years ago
@kunalsharmagnome PyTorch is not detecting any available GPU hardware. You need to check your CUDA installation etc. See PyTorch installation instructions.
I'm closing the issue as it's not related to this repository specifically, it's a more general pytorch install issue. See https://pytorch.org/get-started/locally/
@glenn-jocher i understand this is happening that pytorch is not getting the gpu device but when i am passing < device 0 > and program is not finding the device then it should print proper warning message for better clarity because when it is running it is showing that program is running on device 0 . but thanks for the reply :)
Hmm yes a warning is a good idea here, I’ll add it as a TODO!
@kunalsharmagnome this fix has been implemented. Requesting a device on a CPU or CUDA unavailable system now produces a hard error:
/Users/glennjocher/anaconda3/envs/yolov3/bin/python /Users/glennjocher/PycharmProjects/yolov3/train.py
Traceback (most recent call last):
Namespace(accumulate=1, adam=False, arc='defaultpw', batch_size=16, bucket='', cache_images=False, cfg='cfg/yolov3-spp.cfg', data='data/coco_16img.data', device='', epochs=273, evolve=False, img_size=320, img_weights=False, multi_scale=False, name='', nosave=False, notest=False, prebias=False, rect=False, resume=False, transfer=False, var=None, weights='weights/yolov3-spp.weights')
File "/Users/glennjocher/PycharmProjects/yolov3/train.py", line 411, in <module>
device = torch_utils.select_device(opt.device, apex=mixed_precision)
File "/Users/glennjocher/PycharmProjects/yolov3/utils/torch_utils.py", line 21, in select_device
assert torch.cuda.is_available(), 'CUDA unavailable, invalid device %s requested' % device
AssertionError: CUDA unavailable, invalid device 0 requested
@glenn-jocher i understand this is happening that pytorch is not getting the gpu device but when i am passing < device 0 > and program is not finding the device then it should print proper warning message for better clarity because when it is running it is showing that program is running on device 0 . but thanks for the reply :)
Hi, I had same issue with training with GPU. may I know are you able to solve it in the end? I believed that I had install Pytorch properly. Butt I still cannot training with my GPU. would you mind share your solution?
@Zero23 if PyTorch can't fine a cuda device then you have environment problems unrelated to this repo. You should check your pytorch and cuda installations, or you can use a working environment such as a GCP VM or a Colab instance:
To access an up-to-date working environment (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled), consider a:
@Zero23 if PyTorch can't fine a cuda device then you have environment problems unrelated to this repo. You should check your pytorch and cuda installations, or you can use a working environment such as a GCP VM or a Colab instance:
Reproduce Our Environment
To access an up-to-date working environment (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled), consider a:
- GCP Deep Learning VM with $300 free credit offer: See our GCP Quickstart Guide
- Google Colab Notebook with 12 hours of free GPU time: Google Colab Notebook
- Docker Image from https://hub.docker.com/r/ultralytics/yolov3. See Docker Quickstart Guide
Thank you for your reply. I was able to solve this issue. I just need to update my CUDA driver to latest version. then problem solved! Thank you so much.
@Zero23 great!
when i run this command and try to run the detection faster using GPU i am unable to do that and detec.py start running on cpu . why ? python detect.py --source 0 --cfg test.cfg --data test.data --weight test.weights --device 0
it is running very slow . what can i do to make it run on dedicated GPU @glenn-jocher