Unverified Commit a7f07c1e authored by Yao Matrix's avatar Yao Matrix Committed by GitHub
Browse files

map BACKEND_RESET_MAX_MEMORY_ALLOCATED to reset_peak_memory_stats on XPU (#11191)


Signed-off-by: default avatarYAO Matrix <matrix.yao@intel.com>
parent df1d7b01
......@@ -1161,7 +1161,7 @@ if is_torch_available():
}
BACKEND_RESET_MAX_MEMORY_ALLOCATED = {
"cuda": torch.cuda.reset_max_memory_allocated,
"xpu": None,
"xpu": getattr(torch.xpu, "reset_peak_memory_stats", None),
"cpu": None,
"mps": None,
"default": None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment