-
Notifications
You must be signed in to change notification settings - Fork 29
RuntimeError: CUDA error: invalid device ordinal #1
Comments
You have to change the gpu ids in base options. I was selecting '2,3', ( I have 4 gpus.). You should have fewer GPUs available. Write '0,1' if you have 2 GPUs available |
Sorry, I take a "--gpu_ids '0,1'" Do you know of a better way? |
I was mistaken. 0% 0/123 [00:00<?, ?it/s] File "test.py", line 158, in inference Which parameters should I change? |
hello python .\train.py --gpu_ids -1 but I have the following error:
|
Hi,
In google Collaboratory, the following comment appears and train.py does not work.
----------------- End -------------------
Traceback (most recent call last):
File "train.py", line 15, in
opt = TrainOptions().parse()
File "/content/drive/My Drive/Colab Notebooks/3D_CycleGAN_Project/3D-CycleGan-Pytorch-MedImaging/options/base_options.py", line 109, in parse
torch.cuda.set_device(opt.gpu_ids[0])
File "/usr/local/lib/python3.7/dist-packages/torch/cuda/init.py", line 264, 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.
Do you know of a better way?
Enviroments:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0
Cheers,
Hisanori Yoshimura
E-mail: [email protected]
The text was updated successfully, but these errors were encountered: