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
1c472f8f
Unverified
Commit
1c472f8f
authored
Mar 20, 2026
by
tmm77
Committed by
GitHub
Mar 21, 2026
Browse files
Add get_device_uuid for rocm (#37694)
Signed-off-by:
Tiffany Mintz
<
Tiffany.Mintz@amd.com
>
parent
c57d38d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+15
-0
No files found.
vllm/platforms/rocm.py
View file @
1c472f8f
...
@@ -28,6 +28,7 @@ try:
...
@@ -28,6 +28,7 @@ try:
from
amdsmi
import
(
from
amdsmi
import
(
AmdSmiException
,
AmdSmiException
,
amdsmi_get_gpu_asic_info
,
amdsmi_get_gpu_asic_info
,
amdsmi_get_gpu_device_uuid
,
amdsmi_get_processor_handles
,
amdsmi_get_processor_handles
,
amdsmi_init
,
amdsmi_init
,
amdsmi_shut_down
,
amdsmi_shut_down
,
...
@@ -608,6 +609,20 @@ class RocmPlatform(Platform):
...
@@ -608,6 +609,20 @@ class RocmPlatform(Platform):
return
_ROCM_DEVICE_ID_NAME_MAP
[
device_name
]
return
_ROCM_DEVICE_ID_NAME_MAP
[
device_name
]
return
asic_info
[
"market_name"
]
return
asic_info
[
"market_name"
]
@
classmethod
@
with_amdsmi_context
def
get_device_uuid
(
cls
,
device_id
:
int
=
0
)
->
str
:
try
:
device
=
amdsmi_get_processor_handles
()[
device_id
]
except
AmdSmiException
as
error
:
logger
.
error
(
"amdsmi device query failed "
,
exc_info
=
error
)
return
""
try
:
device_uuid
=
amdsmi_get_gpu_device_uuid
(
device
)
except
AmdSmiException
as
error
:
logger
.
error
(
"amdsmi device uuid query failed "
,
exc_info
=
error
)
return
device_uuid
@
classmethod
@
classmethod
def
get_device_total_memory
(
cls
,
device_id
:
int
=
0
)
->
int
:
def
get_device_total_memory
(
cls
,
device_id
:
int
=
0
)
->
int
:
device_props
=
torch
.
cuda
.
get_device_properties
(
device_id
)
device_props
=
torch
.
cuda
.
get_device_properties
(
device_id
)
...
...
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