@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f13e86d8dd
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 06:15 UTC

[Kernels] Fix Helion GPU utils to use platform-agnostic device name API (#34537)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>

Andreas Karatzas committed Feb 14, 2026 at 22:29 UTC f13e86d8ddf81c638bacce6f8876cf6acf421d58
1 file changed +12 -4
vllm/kernels/helion/utils.py
+12 -4
@@ -2,14 +2,21 @@
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 """Utility functions for Helion kernel management."""
4
5 -import torch
5 +import logging
6 +
7 +from vllm.platforms import current_platform
8 +
9 +logger = logging.getLogger(__name__)
10
11
12 def get_gpu_name(device_id: int | None = None) -> str:
13 if device_id is None:
10 - device_id = torch.cuda.current_device()
11 - props = torch.cuda.get_device_properties(device_id)
12 - return props.name
14 + logger.warning(
15 + "get_gpu_name() called without device_id, defaulting to 0. "
16 + "This may return the wrong device name in multi-node setups."
17 + )
18 + device_id = 0
19 + return current_platform.get_device_name(device_id)
20
21
22 def canonicalize_gpu_name(name: str) -> str:
@@ -18,6 +25,7 @@ def canonicalize_gpu_name(name: str) -> str:
25
26 Converts to lowercase and replaces spaces and hyphens with underscores.
27 e.g., "NVIDIA A100-SXM4-80GB" -> "nvidia_a100_sxm4_80gb"
28 + "AMD_Instinct_MI300X" -> "amd_instinct_mi300x"
29
30 Raises ValueError if name is empty.
31 """