评价此页

torch.xpu.memory.reset_accumulated_memory_stats#

torch.xpu.memory.reset_accumulated_memory_stats(device=None)[source]#

重置XPU内存分配器跟踪的“累积”(历史)统计信息。

有关详细信息,请参阅 memory_stats()。累积统计信息对应于每个统计字典中的 “allocated”“freed” 键。

参数

device (torch.device or int or str, optional) – 选定的设备。如果 deviceNone(默认),则返回当前设备(由 current_device() 指定)的统计信息。