[CI/Build][BugFix][The Rock] Fix get_ssm_device_name to return sanitized, usable filename (#47781)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
This commit is contained in:
rasmith
2026-07-08 12:12:54 +00:00
committed by GitHub
parent 2cae98dfa5
commit 934eeaecfb
8 changed files with 24 additions and 9 deletions
+10
View File
@@ -7,6 +7,7 @@ from concurrent.futures.process import ProcessPoolExecutor
from functools import cache
from typing import Any
import regex as re
import torch
@@ -62,3 +63,12 @@ def num_compute_units(device_id: int = 0) -> int:
from vllm.platforms import current_platform
return current_platform.num_compute_units(device_id)
@cache
def get_device_name_as_file_name(device_id: int = 0) -> str:
from vllm.platforms import current_platform
name = current_platform.get_device_name(device_id)
name = re.sub(r"[\s/]+", "_", name)
return name