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
601057c9
Commit
601057c9
authored
Feb 25, 2025
by
zhuwenwen
Browse files
update rocm.py
parent
b72de6bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+5
-3
No files found.
vllm/platforms/rocm.py
View file @
601057c9
...
...
@@ -144,7 +144,8 @@ class RocmPlatform(Platform):
def
get_device_name
(
cls
,
device_id
:
int
=
0
)
->
str
:
physical_device_id
=
device_id_to_physical_device_id
(
device_id
)
handle
=
amdsmi_get_processor_handles
()[
physical_device_id
]
return
amdsmi_get_gpu_asic_info
(
handle
)[
"market_name"
]
# return amdsmi_get_gpu_asic_info(handle)["market_name"]
return
torch
.
cuda
.
get_device_name
(
device_id
)
@
classmethod
def
get_device_total_memory
(
cls
,
device_id
:
int
=
0
)
->
int
:
...
...
@@ -226,8 +227,9 @@ class RocmPlatform(Platform):
device
:
Optional
[
torch
.
types
.
Device
]
=
None
)
->
float
:
torch
.
cuda
.
reset_peak_memory_stats
(
device
)
return
torch
.
cuda
.
mem_get_info
(
device
)[
1
]
-
torch
.
cuda
.
mem_get_info
(
device
)[
0
]
# return torch.cuda.mem_get_info(device)[1] - torch.cuda.mem_get_info(
# device)[0]
return
torch
.
cuda
.
max_memory_allocated
(
device
)
@
classmethod
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