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 或 int 或 str, 可選) – 選定的裝置。如果
device為None(預設值),則返回當前裝置(由current_device()提供)的統計資訊。