Skip to content

Commit a7f07c1

Browse files
authored
map BACKEND_RESET_MAX_MEMORY_ALLOCATED to reset_peak_memory_stats on XPU (#11191)
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
1 parent df1d7b0 commit a7f07c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/utils/testing_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ def _is_torch_fp64_available(device):
11611161
}
11621162
BACKEND_RESET_MAX_MEMORY_ALLOCATED = {
11631163
"cuda": torch.cuda.reset_max_memory_allocated,
1164-
"xpu": None,
1164+
"xpu": getattr(torch.xpu, "reset_peak_memory_stats", None),
11651165
"cpu": None,
11661166
"mps": None,
11671167
"default": None,

0 commit comments

Comments
 (0)