Shortcuts

torch.cuda.power_draw

torch.cuda.power_draw(device=None)[源代码]
Return the average power draw of the GPU sensor in mW (MilliWatts)

在过去的时间段内,如由nvidia-smi为Fermi或更新版本的全支持设备所给出。

Parameters

设备 (torch.deviceint, 可选) – 选择的设备。返回当前设备的统计信息,由 current_device() 给出,如果 deviceNone(默认)。

Return type

int

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