Issue
How to kill running processes on GPUs for a specific program (e.g. python) in terminal? For example two processes are running with python in the top picture and kill them to see the bottom picture in nvidia-smi
Solution
You can grep python in the nvidia-smi and then pass the PID to the kill -9 command, e.g.
sudo kill -9 $( nvidia-smi | grep 'python' | sed -n 's/|\s*[0-9]\s([0-9])\s.*/\1/p' | sed '/^$/d')
Answered By - salehinejad Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.