如何像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

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐