torch.cuda.温度¶
- torch.cuda.temperature(device=None)[源代码]¶
返回GPU传感器在摄氏度(摄氏度)下的平均温度。
平均温度是基于过去的采样周期计算的,如nvidia-smi所示。
- Parameters
设备 (torch.device 或 int, 可选) – 选择的设备。返回当前设备的统计信息,由
current_device()
给出,如果device
为None
(默认)。- Return type
警告:每个采样周期可能介于1秒到1/6秒之间,具体取决于所查询的产品。