Pytorch显存充足出现CUDA error:out of memory错误
报错内容
Bug描述
显存充足,并且已经通过 torch.nn.DataParallel
指定GPU编号
CUDA与CUDNN均无错误,NVIDIA驱动无错误
解决方案
以上情况很可能是是Tensorflow和pytorch冲突导致的,因为我发现当我同学在0号GPU上运行程序我就会出问题。
详见pytorch官方论坛:
https://discuss.pytorch.org/t/gpu-is-not-utilized-while-occur-runtimeerror-cuda-runtime-error-out-of-memory-at/34780