Devel/Deep Learning

CUDA out of memeory.. 장애 발생 해결 방법

kogun82 2024. 5. 3. 15:40

[장애 메세지]

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

 

[해결 방법]

다음과 유사한 방식으로 환경 변수 설정

Windows: set 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512'
Linux: export 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512'