Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
157caf51
Unverified
Commit
157caf51
authored
Jan 27, 2026
by
Paco Xu
Committed by
GitHub
Jan 27, 2026
Browse files
[Perf] avoid duplicate mem_get_info() call in get_current_memory_usage (#33064)
Signed-off-by:
Paco Xu
<
paco.xu@daocloud.io
>
parent
0b53bec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+2
-1
No files found.
vllm/platforms/rocm.py
View file @
157caf51
...
@@ -561,7 +561,8 @@ class RocmPlatform(Platform):
...
@@ -561,7 +561,8 @@ class RocmPlatform(Platform):
cls
,
device
:
torch
.
types
.
Device
|
None
=
None
cls
,
device
:
torch
.
types
.
Device
|
None
=
None
)
->
float
:
)
->
float
:
torch
.
cuda
.
reset_peak_memory_stats
(
device
)
torch
.
cuda
.
reset_peak_memory_stats
(
device
)
return
torch
.
cuda
.
mem_get_info
(
device
)[
1
]
-
torch
.
cuda
.
mem_get_info
(
device
)[
0
]
free_mem
,
total_mem
=
torch
.
cuda
.
mem_get_info
(
device
)
return
total_mem
-
free_mem
@
classmethod
@
classmethod
def
get_device_communicator_cls
(
cls
)
->
str
:
def
get_device_communicator_cls
(
cls
)
->
str
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment