728x90
반응형
print("GPU 가용여부 ", torch.cuda.is_available())
print("GPU 갯수 ", torch.cuda.device_count())
print("GPU 이름 ", torch.cuda.get_device_name(0))
device = "cuda:0" if torch.cuda.is_available() else "cpu"
print(device)
# 결과 값
GPU 가용여부 True
GPU 갯수 2
GPU 이름 NVIDIA GeForce RTX 3080 Ti
cuda:0
반응형
'데이터분석 > Pytorch' 카테고리의 다른 글
tensor 생략없이 (0) | 2024.05.03 |
---|---|
모델 학습 GPU 병행처리(nn.DataParallel) (0) | 2024.03.13 |
[Pytorch] Tensor CPU, GPU 변경 (0) | 2022.11.28 |
[Pytorch] Tensor(텐서) 오류 해결 모음 (0) | 2022.11.28 |
[Pytorch] 파이토치 Tensor(텐서)의 최대 값, 인덱스 (1) | 2022.11.28 |
댓글