File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1081,20 +1081,28 @@ def _is_torch_fp64_available(device):
10811081 "cuda" : torch .cuda .manual_seed ,
10821082 "xpu" : torch .xpu .manual_seed ,
10831083 "cpu" : torch .manual_seed ,
1084+ "mps" : torch .mps .manual_seed ,
10841085 "default" : torch .manual_seed ,
10851086 }
10861087 BACKEND_RESET_PEAK_MEMORY_STATS = {
10871088 "cuda" : torch .cuda .reset_peak_memory_stats ,
10881089 "xpu" : getattr (torch .xpu , "reset_peak_memory_stats" , None ),
1090+ "cpu" : None ,
1091+ "mps" : None ,
10891092 "default" : None ,
10901093 }
10911094 BACKEND_RESET_MAX_MEMORY_ALLOCATED = {
10921095 "cuda" : torch .cuda .reset_max_memory_allocated ,
1096+ "xpu" : None ,
1097+ "cpu" : None ,
1098+ "mps" : None ,
10931099 "default" : None ,
10941100 }
10951101 BACKEND_MAX_MEMORY_ALLOCATED = {
10961102 "cuda" : torch .cuda .max_memory_allocated ,
10971103 "xpu" : getattr (torch .xpu , "max_memory_allocated" , None ),
1104+ "cpu" : 0 ,
1105+ "mps" : 0 ,
10981106 "default" : 0 ,
10991107 }
11001108
You can’t perform that action at this time.
0 commit comments