GPU가 정상 인식되지 않는 데에는 여러 가지 이유가 있을 수 있지만, 그 중 대부분은 버전 호환 문제입니다.
아래 4가지의 버전을 모두 확인해서 서로 호환이 가능한지 확인해야 합니다.
1. pytorch, torchvision, torchaudio
PyTorch
An open source machine learning framework that accelerates the path from research prototyping to production deployment.
pytorch.org
2. CUDA
Release Notes :: CUDA Toolkit Documentation
Beginning in 2022, the NVIDIA Math Libraries official hardware support will follow an N-2 policy, where N is an x100 series GPU.
docs.nvidia.com
3. CuDNN
Support Matrix :: NVIDIA Deep Learning cuDNN Documentation
These support matrices provide a look into the supported versions of the OS, NVIDIA CUDA, the CUDA driver, and the hardware for the NVIDIA cuDNN 8.4.1 release. For previously released cuDNN installation documentation, refer to the NVIDIA cuDNN Archives.
docs.nvidia.com
4. Nvidia Driver
CUDA Compatibility :: NVIDIA Data Center GPU Driver Documentation
The CUDA driver maintains backward compatibility to continue support of applications built on older toolkits. Using a compatible minor driver version, applications build on CUDA Toolkit 11 and newer are supported on any driver from within the corresponding
docs.nvidia.com
만약 모든 버전을 맞췄는데도 여전히 torch.cuda.is_available()
이 False
가 나온다면 아래 오른쪽 그림처럼 CUDA를 지원하는 버전이 설치된 것이 맞는지 확인해야 합니다.
왼쪽 그림과 같은 상황이라면 pip uninstall pytorch torchvision torchaudio
로 모두 지운 후 다시 위 1번 링크에서 확인한 명령어를 통해 재설치해야 합니다.
'공부하며 성장하기 > Fixing Errors' 카테고리의 다른 글
Docker Desktop shutting down 해결 (0) | 2024.02.22 |
---|---|
Loss function returned Nan values 해결 (0) | 2023.12.08 |
AWS ECR 이미지와 lambda로 딥러닝 Serverless 서비스 만들기 - UnicodeDecodeError 해결 (0) | 2023.06.13 |
torch.load 시 _pickle.UnpicklingError: invalid load key 해결 (0) | 2022.10.29 |
requirements.txt에서 URL로 PyTorch 설치하기 (1) | 2022.09.21 |