nvidia-smi没有进程,但是显存占用
背景笔者使用的bert-servicehttps://github.com/hanxiao/bert-as-service在使用完后,使用ctrl + c强行结束了bert-serving但是下次再开启的时候,就报错,说明上次还有程序没有结束,可是nvidia-smi没有进程ps aux|grep python...
·
背景
笔者使用的bert-service
https://github.com/hanxiao/bert-as-service
在使用完后,使用ctrl + c强行结束了bert-serving
但是下次再开启的时候,就报错,说明上次还有程序没有结束,可是
nvidia-smi没有进程
网上大部分办法是
fuser -v /dev/nvidia*
但是笔者这里也没有查到相应程序。
因为bert-serving本质是使用tensorflow的,所以可以通过
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices("GPU")
print(gpus)
if gpus:
tf.config.experimental.set_memory_growth(gpus[0],True)
但是也不行,查不到
最后还是简单粗暴,直接找python 进程:
ps aux|grep python
最后找到了,直接kill就可以了
更多推荐
所有评论(0)