[Platform] Replace torch.cuda.mem_get_info with torch.accelerator.get_memory_info (#44825)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Kunshang Ji <jikunshang95@gmail.com>
This commit is contained in:
Kunshang Ji
2026-06-30 14:39:52 +08:00
committed by GitHub
parent 0feca7ffa8
commit fb42e5219e
17 changed files with 56 additions and 52 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ class MemorySnapshot:
"allocated_bytes.all.peak", 0
)
self.free_memory, self.total_memory = current_platform.mem_get_info(device)
self.free_memory, self.total_memory = torch.accelerator.get_memory_info(device)
if current_platform.is_integrated_gpu(device.index):
# On UMA (Unified Memory Architecture) platforms where CPU and
# GPU share physical memory (e.g. GH200, DGX Spark, Jetson Orin),