Fix peak memory profiling (#2031)

This commit is contained in:
Woosuk Kwon
2023-12-12 22:01:53 -08:00
committed by GitHub
parent 3fefe271ec
commit 30bad5c492
2 changed files with 3 additions and 9 deletions
-5
View File
@@ -40,11 +40,6 @@ def get_max_shared_memory_bytes(gpu: int = 0) -> int:
return int(max_shared_mem)
def get_gpu_memory(gpu: int = 0) -> int:
"""Returns the total memory of the GPU in bytes."""
return torch.cuda.get_device_properties(gpu).total_memory
def get_cpu_memory() -> int:
"""Returns the total CPU memory of the node in bytes."""
return psutil.virtual_memory().total