评价此页

torch.cuda.power_draw#

torch.cuda.power_draw(device=None)[source]#
返回GPU传感器在 nvidia-smi 给出的采样周期内的平均功耗(毫瓦)。仅支持 Fermi 或更新的设备。

over the past sample period as given by nvidia-smi for Fermi or newer fully supported devices.

参数

device (torch.deviceint, optional) – selected device. Returns statistic for the current device, given by current_device(), if device is None (default).

返回类型

int

警告:每个采样周期可能在 1 秒到 1/6 秒之间,具体取决于查询的产品。