如何像colab实时查看gpu的使用率?
import gpustat
gpustat.print_gpustat()
[0]: GPU index (starts from 0) as PCI_BUS_ID
GeForce GTX Titan X: GPU name
77°C: GPU Temperature (in Celsius)
96 %: GPU Utilization
11848 / 12287 MB: GPU Memory Usage (Used / Total)
python/…: Running processes on GPU, owner/cmdline/PID (and their GPU memory usage)
官方地址:https://github.com/wookayin/gpustat