torch.xpu.memory.reset_peak_memory_stats#
- torch.xpu.memory.reset_peak_memory_stats(device=None)[source]#
重置 XPU 内存分配器跟踪的“峰值”统计信息。
有关详细信息,请参阅
memory_stats()
。峰值统计信息对应于每个单独的统计信息字典中的 “peak” 键。- 参数
device (torch.device 或 int 或 str, optional) – 选定的设备。如果
device
为None
(默认值),则返回当前设备(通过current_device()
获取)的统计信息。