Skip to content

Commit c6d46a2

Browse files
[ROCm][Bugfix] Return empty UUID string when amdsmi uuid query fails
RocmPlatform.get_device_uuid caught AmdSmiException from amdsmi_get_gpu_device_uuid but did not return, leaving device_uuid unbound. The trailing `return device_uuid` then raised UnboundLocalError, masking the original amdsmi error. Return "" on failure, matching the handling of the preceding handle-query block. Signed-off-by: Chuan Li <chuali@amd.com> Co-authored-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6472131 commit c6d46a2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

vllm/platforms/rocm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ def get_device_uuid(cls, device_id: int = 0) -> str:
753753
device_uuid = amdsmi_get_gpu_device_uuid(device)
754754
except AmdSmiException as error:
755755
logger.error("amdsmi device uuid query failed ", exc_info=error)
756+
return ""
756757
return device_uuid
757758

758759
@classmethod

0 commit comments

Comments
 (0)