[딥러닝] 윈도우에서 Cuda, cuDNN 설치하기
Cuda와 cuDNN 이란?
CUDA toolkit
- NVDIA에서 개발한 소프트웨어 개발도구 모음
- GPU가 병렬연산을 수행할 수 있게 해준다. → 고성능 컴퓨팅 연산이 가능하게 됨
CUDA Toolkit 12.1 Downloads
Get the latest feature updates to NVIDIA's proprietary compute stack.
developer.nvidia.com
cuDNN
- GPU 가속화 라이브러리로 GPU의 성능을 극대화하고 모델 학습 및 추론 속도를 크게 향상
- cuda에서 설치한 파일에 덮어씌우는 형태로 설치
CUDA Deep Neural Network
cuDNN provides researchers and developers with high-performance GPU acceleration.
developer.nvidia.com
설치 방법
내 컴퓨터 사양 확인
- CPU : AMD Ryzen 5 5600
- RAM : 32GB
- OS : Windows x64
- GPU : NVIDIA GeForce 3070
설치 방법
1. 본인 사양에 맞는 CUDA 확인
CUDA - Wikipedia
From Wikipedia, the free encyclopedia Parallel computing platform and programming model In computing, CUDA (originally Compute Unified Device Architecture) is a proprietary[1] parallel computing platform and application programming interface (API) that all
en.wikipedia.org
3070 그래픽 카드의 Compute Capability는 8.6이므로 아래의 링크에서 8.6에 맞는 CUDA SDK 버전을 확인한다.
CUDA - Wikipedia
From Wikipedia, the free encyclopedia Parallel computing platform and programming model In computing, CUDA (originally Compute Unified Device Architecture) is a proprietary[1] parallel computing platform and application programming interface (API) that all
en.wikipedia.org
다운로드 사이트
CUDA Toolkit Archive
Previous releases of the CUDA Toolkit, GPU Computing SDK, documentation and developer drivers can be found using the links below. Please select the release you want from the list below, and be sure to check www.nvidia.com/drivers for more recent production
developer.nvidia.com
2. NVIDIA 그래픽카드 드라이버 설치
최신 정식 NVIDIA 드라이버 다운로드
최신 정식 NVIDIA 드라이버를 다운로드하여 PC 게임 경험을 향상시키고 앱을 더 빠르게 실행하세요.
www.nvidia.com
3. cuDNN 설치
NVIDIA developer에 가입이 필요하다.
가입 후에는 설치한 cuda 버전에 맞는 cuDNN 버전을 설치한다.
cuDNN Archive
Download releases from the GPU-accelerated primitive library for deep neural networks.
developer.nvidia.com
4. cuDNN 파일 옮기기
CUDA를 기본 설정으로 모두 설치했으면 cuDNN은 압축을 풀고 안에 있는 cuda 폴더를 CUDA가 설치된 폴더로 붙여 넣는다.
CUDA는 default 설정으로 설치 시 아래의 루트에 설치된다.
CUDA 기본 경로
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v{버전넘버}
경로를 다르게 설치했다면 환경변수에서도 경로를 확인할 수 있고, 만약 경로가 환경변수에 등록이 안 됐으면 등록해줘야 한다.
설치 확인
cmd 창에서 다음 코드 입력 후 실행 결과를 확인한다.
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v{버전}\extras\demo_suite\deviceQuery.exe"
최하단 Result = PASS라고 나오면 성공이며, CUDA Driver Version = 12.6, Runtime Version = 12.4라고 다르게 나오는데 Driver Version 은 말 그대로 NVIDIA Driver로 설치된 버전이고 Runtime은 CUDA tool kit에 의해 설치된 버전이므로 정상이다.