Closed yanjunma closed 5 years ago
Hi Guys, I am trying to run the scripts using Colab with GPU runtime. I downloaded the weights and when I started to run, the following error occured:
THCudaCheck FAIL file=/pytorch/torch/csrc/cuda/Module.cpp line=34 error=10 : invalid device ordinal Traceback (most recent call last): File "test.py", line 9, in opt = TestOptions().parse() File "/content/icface/test_code_released/options/base_options.py", line 61, in parse torch.cuda.set_device(self.opt.gpu_ids[0]) File "/usr/local/lib/python3.6/dist-packages/torch/cuda/init.py", line 264, in set_device torch._C._cuda_setDevice(device) RuntimeError: cuda runtime error (10) : invalid device ordinal at /pytorch/torch/csrc/cuda/Module.cpp:34
And I checked, colab has GPU available as '/device:GPU:0' Thanks
Hi, use --gpu_ids 0 in the test command.
It worked. Thank you. Sorry I missed the gpu_ids in the command line instruction.
Hi Guys, I am trying to run the scripts using Colab with GPU runtime. I downloaded the weights and when I started to run, the following error occured:
THCudaCheck FAIL file=/pytorch/torch/csrc/cuda/Module.cpp line=34 error=10 : invalid device ordinal Traceback (most recent call last): File "test.py", line 9, in
opt = TestOptions().parse()
File "/content/icface/test_code_released/options/base_options.py", line 61, in parse
torch.cuda.set_device(self.opt.gpu_ids[0])
File "/usr/local/lib/python3.6/dist-packages/torch/cuda/init.py", line 264, in set_device
torch._C._cuda_setDevice(device)
RuntimeError: cuda runtime error (10) : invalid device ordinal at /pytorch/torch/csrc/cuda/Module.cpp:34