AssertionError: CUDA is not available
ChaoYue0307 opened this issue · comments
I have cuda version 9.0.176 on my server, but still got the error when running train.py in the title, how to handle that?
Thanks
Did you test your environment settings with some pytorch baselines, for example, the MNIST classification ? It seems that the CUDA isn't installed well.
Thanks and I reinstalled pytorch and cuda, the problem is solved.
But new problem comes with
RuntimeError: cuda runtime error (10) : invalid device ordinal at torch/csrc/cuda/Module.cpp:32
do you have any idea about that?
Thanks
It seems that you should check your device_id. It shouldn't be larger than the number of available GPUs.
Really thanks a lot, indeed the problem is the device_id, your default is 7 but I have only 4 gpus on my server.