赞
踩
CUDA报错:CUDA out of memory:
Tried to allocate 12.11 GiB (GPU 0; 23.70 GiB total capacity; 2.40 GiB already allocated; 11.78 GiB free; 9.93 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......
解决:运行推理前:export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:32
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。