wjn922 / ReferFormer

[CVPR2022] Official Implementation of ReferFormer
Apache License 2.0
312 stars 25 forks source link

CUDA error: invalid device ordinal #55

Open liuleiBUAA opened 2 months ago

liuleiBUAA commented 2 months ago

When I run python3 inference_ytvos.py --with_box_refine --binary --freeze_text_encoder --output_dir=output --resume=models/r50_refytvos_finetune.pth --backbone resnet50 The error is : File "/opt/conda/envs/referformer/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/opt/conda/envs/referformer/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "inference_ytvos.py", line 133, in sub_processor torch.cuda.set_device(pid) File "/opt/conda/envs/referformer/lib/python3.7/site-packages/torch/cuda/init.py", line 326, in set_device torch._C._cuda_setDevice(device) RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

dohyun1411 commented 1 month ago

https://github.com/wjn922/ReferFormer/blob/232b4066fb7d10845e4083e6a5a2cc0af5d1757e/opts.py#L128 You should change ngpus