NVIDIA: "런타임 오류: CUDA GPU를 사용할 수 없습니다"

NVIDIA: "런타임 오류: CUDA GPU를 사용할 수 없습니다"

Ubuntu에서 PyTorch를 사용하여 간단한 알고리즘을 구현하고 있습니다. 이미 두 번이나 내 NVIDIA 드라이버가 손상되어 알고리즘을 실행하면 다음과 같은 역추적이 생성됩니다.

Traceback (most recent call last):
 File "module.py", line 212, in <module>
    inputs_tensor = torch.tensor(inputs_train).to(device)
  File "/home/user/.venv/lib/python3.8/site-packages/torch/cuda/__init__.py", line 172, in _lazy_init
    torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available

드라이버를 두 번 다시 설치했지만 몇 번 재부팅하면 다시 손상됩니다.

$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

$ grep "X Driver" /var/log/Xorg.0.log
[    43.342] (II) NVIDIA dlloader X Driver  440.100  Fri May 29 08:21:27 UTC 202

관련 정보