Skip to content

Commit

Permalink
[ROCm] Using a more precise memory profiling (vllm-project#12624)
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
Signed-off-by: saeediy <saidakbarp@gmail.com>
  • Loading branch information
gshtras authored and Said-Akbar committed Mar 7, 2025
1 parent f422c49 commit 20a30bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/platforms/rocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@ def get_current_memory_usage(cls,
device: Optional[torch.types.Device] = None
) -> float:
torch.cuda.reset_peak_memory_stats(device)
return torch.cuda.max_memory_allocated(device)
return torch.cuda.mem_get_info(device)[1] - torch.cuda.mem_get_info(
device)[0]

0 comments on commit 20a30bf

Please sign in to comment.