AI & 머신러닝 & 딥러닝

[딥러닝] 개발환경 구축하기_cuda, torch

mle21 2023. 5. 19. 06:00
반응형

1. 내컴퓨터 그래픽카드 사양 확인하기

바탕화면 마우스 우클릭 > NVIDIA 제어판(NVIDIA Control Panel) > 시스템 정보(System Information)

ex) 아래 내 노트북의 경우 NVIDIA GeForce 940MX

2. GPU Compute Capability 확인하기

아래 사이트에서 검색하면 GeForce GTX 1080 Ti 의 경우 6.1

 

CUDA GPUs - Compute Capability

Explore your GPU compute capability and CUDA-enabled products.

developer.nvidia.com

3. GPU Compute Capability 호환 suda sdk 버전 확인 (녹색 부분이 Compute Capability 점수임)

아래 사이트에서 Compute Capability 6.1 기준 cuda 8~12까지 사용 가능

※ 특별히 필요한 cuda 버전이 없다면 pytorch에서 지원하는 최신 버전으로 설치(아래 5번 참조)

※ 20230519 현 시점 기준 pytorch는 cuda 11.8버전까지만 지원 중

 

CUDA - Wikipedia

From Wikipedia, the free encyclopedia Parallel computing platform and programming model CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of

en.wikipedia.org

4. 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

5. pytorch 다운로드 및 설치

사이트 접속하여 자신의 상황에 맞게 선택하고 Run this Command 항목의 내용을 복사하여 실행

※ 20230519 현 시점 기준 pytorch 최신 버전은 2.0.1

 

 

PyTorch

An open source machine learning framework that accelerates the path from research prototyping to production deployment.

pytorch.org

이전 버전의 pytorch를 설치하고 싶으면 아래 사이트 참조

※ 아래 사이트에서 cuda 버전과 torch 버전을 확인하고 설치하자.

ex) CUDA 11.7 / torch 2.0.0

# CUDA 11.7
pip install torch==2.0.0+cu117 torchvision==0.15.1+cu117 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu117
 

PyTorch

An open source machine learning framework that accelerates the path from research prototyping to production deployment.

pytorch.org

 

728x90