当前位置:   article > 正文

解决:CUDA out of memory: Tried to allocate 12.11 GiB......_outofmemoryerror('cuda out of memory. tried to all

outofmemoryerror('cuda out of memory. tried to allocate 23.54 gib (gpu 0; 12

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/220603
推荐阅读
相关标签
  

闽ICP备14008679号