We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45959d7 commit dfdc219Copy full SHA for dfdc219
src/accelerate/test_utils/scripts/external_deps/test_peak_memory_usage.py
@@ -69,7 +69,7 @@ def __enter__(self):
69
self.begin = torch.npu.memory_allocated()
70
elif is_xpu_available():
71
torch.xpu.empty_cache()
72
- torch.xpu.reset_max_memory_allocated() # reset the peak gauge to zero
+ torch.xpu.reset_peak_memory_stats() # reset the peak gauge to zero
73
self.begin = torch.xpu.memory_allocated()
74
elif is_hpu_available():
75
# torch.hpu.empty_cache() # not available on hpu as it reserves all device memory for the current process
0 commit comments