새소식

System Management

윈도우 환경에서 GPU 사용하기

  • -

1. PC 장착된 GPU 모델 확인

- 현재 그래픽 카드 정보

NVIDIA Geforce RTX 3090

 

2. CUDA Veresion 확인

nvidia-smi

 

Compute Capability: https://en.wikipedia.org/wiki/CUDA#GPUs_supported

 

CUDA - Wikipedia

From Wikipedia, the free encyclopedia Parallel computing platform and programming model CUDA (or Compute Unified Device Architecture) is a proprietary and closed-source parallel computing platform and application programming interface (API) that allows sof

en.wikipedia.org

사이트에서 CUDA 버전에 맞는 Compute Capability 확인할 수 있으며, 현재 NVIDIA GeForce RTX 3090의 CUDA Capability는 8.6 이다.

Compute Capability, GPU semiconductors and Nvidia GPU board products

 

3. CUDA Toolkit 설치

다운로드 페이지: https://developer.nvidia.com/cuda-toolkit-archive

 

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

 

4. cuDNN 설치

다운로드 페이지(회원 가입 필수): https://developer.nvidia.com/rdp/cudnn-archive

 

cuDNN Archive

Download releases from the GPU-accelerated primitive library for deep neural networks.

developer.nvidia.com

다운로드 파일 압축 후 bin, include, lib 폴더 존재

CUDA Toolkit 설치 된 폴더에 존재하는 bin, include, lib 폴더에 다운로드한 bin, include, lib 폴더 내의 파일을 추가

C:\Program Files\NVIDIA GPU Computing Toolkit # 윈도우 설치 기본 경로

 

5. GPU 활용 가능 테스트 코드

import tensorflow as tf # tensorflow
tf.config.list_physical_devices('GPU')

from tensorflow.python.client import device_lib
device_lib.list_local_devices()

import torch #pytorch
torch.cuda.is_available()
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.