Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA error: invalid device ordinal #55

Open
liuleiBUAA opened this issue May 6, 2024 · 1 comment
Open

CUDA error: invalid device ordinal #55

liuleiBUAA opened this issue May 6, 2024 · 1 comment

Comments

@liuleiBUAA
Copy link

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
Copy link

parser.add_argument('--ngpu', default=8, type=int, help='gpu number when inference for ref-ytvos and ref-davis')

You should change ngpus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants