Ubuntu CUDA runtime implicit initialization on GPU:0 failed. Status: out of memory

Ubuntu CUDA runtime implicit initialization on GPU:0 failed. Status: out of memory


1.查看进程
fuser -v /dev/nvidia*

2.杀掉占用显存的进程
kill PID

Ubuntu CUDA runtime implicit initialization on GPU:0 failed. Status: out of memory_第1张图片

3.如果进程很多,就批量kill

ps -ef | grep python | grep -v grep //列出所有名字有python的进程

ps -ef | grep python | grep -v grep | awk '{print "kill -9 "$2}' //打印kill到所有这些进程的命令

ps -ef | grep python | grep -v grep | awk '{print "kill -9 "$2}' | sh //执行这些命令

你可能感兴趣的:(环境配置,Ubuntu,显卡溢出,GPU)