일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Linux
- Windows
- pytorch
- pandas
- Laravel
- file
- docker
- list
- GitLab
- DB
- judge
- PostgreSQL
- Flask
- Mac
- git
- LLM
- Converting
- TORCH
- Package
- evaluation
- enV
- Python
- Database
- AI
- Container
- format
- Paper
- CUDA
- numpy
- KAKAO
Archives
- Today
- Total
Daily Develope
[Torch] pyTorch 자주 쓰는 명령어 정리 본문
m반쩨 GPU device 사용
improt os
# 1번째 device만 사용
os.environ["CUDA_VISIBLE_DEVICES"]= "1"
# 2, 3번째 device 사용
os.environ["CUDA_VISIBLE_DEVICES"]= "2,3"
# 혹은 terminal에서 export 환경변수로 선언해 사용
# export CUDA_VISIBLE_DEVICES=1
GPU 사용 가능여부 확인
torch.cuda.is_available()
현재 사용중인 device 번호 확인
device slot 순서와 상관없이 기본적으로 0번부터 할당 (즉 장치가 1개라면 0으로 출력)
torch.cuda.current_device()
현재 사용중인 device 개수 확인
torch.cuda.device_count()
'AI' 카테고리의 다른 글
[Article] OpenAI o1 간략 정리 (1) | 2024.10.02 |
---|---|
[LLM] llama 3 주요 정보 정리 (0) | 2024.04.24 |
[Paper] Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (1) | 2024.04.02 |
[Paper] G-EVAL : NLG Evaluation using GPT-4 with Better Human Alignment (2) | 2024.03.13 |
[Paper] Evaluating Large Language Models: A Comprehensive Survey (0) | 2024.03.05 |