WorkBuddy 占用显存导致碎片化

WorkBuddy 占用显存导致碎片化

bash 复制代码
dtype if t.is_floating_point() or t.is_complex() else None,
 non_blocking) torch.cuda.OutOfMemoryError: 
 CUDA out of memory. Tried to allocate 20.00 MiB. 
 GPU 0 has a total capacty of 16.00 GiB of which 10.88 GiB is free. 
Of the allocated memory 3.96 GiB is allocated by PyTorch, and 8.55 MiB

用 Work Buddy 弄了一个用到本地显卡的小项目,结果经常爆显存。最后查了半天发现,是因为 Work Buddy 自己占用显存导致碎片化,退出 Work Buddy 就能运行这个小项目了。