일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- DT
- lg인적성모의고사
- lgenius
- cloudarchitecting
- lg인적성합격
- awscloud
- aws
- awsacademy
- aws클라우드부트캠프
- lg적성검사
- lg인성검사
- 2022awscloudbootcamp
- lg디스플레이lgenius
- 데이터분석
- LG디스플레이
- sk
- lg합격
- SK인턴
- sktai
- lg디스플레이산학장학생
- SKC&C
- cloudfoundations
- SKT
- 2022awscloud
- awscloudbootcamp
- e1인턴
- lg인재상
- LG인적성
- LGD
- LG인적성후기
Archives
- Today
- Total
냥냥파워
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 11.00 GiB total capacity; 8.99 GiB already allocated; 0 bytes free; 9.54 GiB reserved in total by PyTorch) 본문
POSTECH AI연구원 인턴
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 11.00 GiB total capacity; 8.99 GiB already allocated; 0 bytes free; 9.54 GiB reserved in total by PyTorch)
hjhjhj0028 2022. 6. 21. 14:35에러 발생!
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 11.00 GiB total capacity; 8.99 GiB already allocated; 0 bytes free; 9.54 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
https://artiiicy.tistory.com/61
[Pytorch] 특정 GPU 사용하기 / 여러개의 multi GPU parallel 하게 사용하기
Neural network를 train을 하다보면 성능을 비교하기 위해 loss function, optimizer 등이 상이한 여러 가지 model을 돌려볼 일이 수도 없이 많다. 이 때, 한 장의 GPU만 있다면 어쩔 수 없지만 여러장의 GPU가 존.
artiiicy.tistory.com
알고보니 모델 구축하는 중간 과정에서
shape을 확인하기 위해
model을 불러오고 output을 뽑으면서
cuda memory를 많이 잡아먹었다
코드 중간중간
! nvidia-smi를 해서
어느 지점에서 memory를
많이 차지하는지 확인하는게 좋다
torch.cuda.is_available() # True
torch.cuda.get_device_name() # 'NVIDIA GeForce GTX 1080 Ti'
Output exceeds the size limit. Open the full output data in a text editor
Tue Jun 21 15:09:34 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.89 Driver Version: 465.89 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA Quadro K620 WDDM | 00000000:03:00.0 Off | N/A |
| 35% 48C P8 1W / 30W | 40MiB / 2048MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 NVIDIA GeForce ... WDDM | 00000000:04:00.0 On | N/A |
| 33% 51C P8 14W / 250W | 510MiB / 11264MiB | 13% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
아무튼 해결완료!
BIG
'POSTECH AI연구원 인턴' 카테고리의 다른 글
ViT for Image Classification (Visual Transformer) (0) | 2022.06.21 |
---|---|
Image Classification with ResNet50 in Pytorch (0) | 2022.06.20 |
RuntimeError: cuda runtime error(10): invalid device ordinal (0) | 2022.06.17 |
YoloV5 Detector로 OCR 데이터셋 한글 검출하기 (0) | 2022.06.16 |
RuntimeError: CUDA error: device-side assert triggered (0) | 2022.06.16 |