[Solved] UserWarning: CUDA initialization: CUDA unknown error – this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at …/c10/cuda/CUDAFunctions.cpp:109.) return torch._C._cuda_getDeviceCount() > 0
Last Updated on 2023-06-07 by Clay
Problem
Today when I training the model on my server, I write an GPU parallel training script, and input the newest training data; but in the process of training, I got an error message about “GPU not found“. After I using torch.cuda.is_available()
to check my device, I got another error message as following: