[Bugfix] Normalize slashes in Helion GPU names (#46101)
Signed-off-by: cyq <15000851237@163.com>
This commit is contained in:
@@ -17,6 +17,7 @@ from vllm.kernels.helion.utils import canonicalize_gpu_name
|
|||||||
("NVIDIA H100 SXM5", "nvidia_h100"),
|
("NVIDIA H100 SXM5", "nvidia_h100"),
|
||||||
("NVIDIA GeForce RTX 4090", "nvidia_geforce_rtx_4090"),
|
("NVIDIA GeForce RTX 4090", "nvidia_geforce_rtx_4090"),
|
||||||
("AMD Instinct MI300X", "amd_instinct_mi300x"),
|
("AMD Instinct MI300X", "amd_instinct_mi300x"),
|
||||||
|
("AMD Instinct MI250X / MI250", "amd_instinct_mi250x_mi250"),
|
||||||
("Tesla V100-SXM2-32GB", "tesla_v100"),
|
("Tesla V100-SXM2-32GB", "tesla_v100"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
"""Utility functions for Helion kernel management."""
|
"""Utility functions for Helion kernel management."""
|
||||||
|
|
||||||
|
import regex as re
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from vllm.logger import init_logger
|
from vllm.logger import init_logger
|
||||||
@@ -62,7 +63,7 @@ def canonicalize_gpu_name(name: str) -> str:
|
|||||||
"""
|
"""
|
||||||
Canonicalize GPU name for use as a platform identifier.
|
Canonicalize GPU name for use as a platform identifier.
|
||||||
|
|
||||||
Converts to lowercase, replaces spaces and hyphens with underscores,
|
Converts to lowercase, replaces separators with underscores,
|
||||||
and maps known variant names to their canonical form via _GPU_NAME_ALIASES.
|
and maps known variant names to their canonical form via _GPU_NAME_ALIASES.
|
||||||
e.g., "NVIDIA H100 80GB HBM3" -> "nvidia_h100"
|
e.g., "NVIDIA H100 80GB HBM3" -> "nvidia_h100"
|
||||||
"NVIDIA A100-SXM4-80GB" -> "nvidia_a100"
|
"NVIDIA A100-SXM4-80GB" -> "nvidia_a100"
|
||||||
@@ -70,9 +71,7 @@ def canonicalize_gpu_name(name: str) -> str:
|
|||||||
"""
|
"""
|
||||||
if not name or not name.strip():
|
if not name or not name.strip():
|
||||||
raise ValueError("GPU name cannot be empty")
|
raise ValueError("GPU name cannot be empty")
|
||||||
name = name.lower()
|
name = re.sub(r"[\s/-]+", "_", name.lower())
|
||||||
name = name.replace(" ", "_")
|
|
||||||
name = name.replace("-", "_")
|
|
||||||
if name in _GPU_NAME_ALIASES:
|
if name in _GPU_NAME_ALIASES:
|
||||||
return _GPU_NAME_ALIASES[name]
|
return _GPU_NAME_ALIASES[name]
|
||||||
return name
|
return name
|
||||||
|
|||||||
Reference in New Issue
Block a user