评价此页

torch.cuda.temperature#

torch.cuda.temperature(device=None)[source]#

返回 GPU 传感器传感器的平均温度(摄氏度)。

平均温度根据 nvidia-smi 给定的过去采样周期计算。

参数

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 秒之间,具体取决于查询的产品。