[CI/Build][ROCm] Keep the CUDA-only kernel tests out of the ROCm run (#53113)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
This commit is contained in:
stefankoncarevic
2026-08-20 13:40:33 -05:00
committed by GitHub
parent d56bbf3995
commit 3b829cf176
2 changed files with 10 additions and 3 deletions
+5 -2
View File
@@ -16,6 +16,7 @@ import pytest
import torch
from vllm._custom_ops import fp32_router_gemm
from vllm.platforms import current_platform
# (hidden_size, num_experts)
SHAPES = [(3072, 256), (6144, 128), (6144, 256)]
@@ -26,8 +27,10 @@ ATOL_BF16 = 2e-2 # bf16 activation has lower precision
def _requires_sm90():
if not torch.cuda.is_available():
pytest.skip("CUDA not available")
# ROCm reports a CUDA-like device capability (gfx950 -> (9, 5)), which would
# pass the SM90 check below for a kernel that is only built for CUDA.
if not current_platform.is_cuda():
pytest.skip("fp32_router_gemm is built for CUDA only")
major, minor = torch.cuda.get_device_capability()
if major * 10 + minor < 90:
pytest.skip(f"fp32_router_gemm requires SM90+, got SM{major}{minor}")
+5 -1
View File
@@ -12,7 +12,6 @@ from vllm.distributed.parallel_state import (
init_distributed_environment,
initialize_model_parallel,
)
from vllm.models.kimi_k3.nvidia.ops.cute_dsl.gemm_rs import GemmRS
from vllm.platforms import current_platform
from vllm.utils.network_utils import get_open_port
from vllm.utils.system_utils import update_environment_variables
@@ -70,6 +69,11 @@ def _assert_valid_rows_close(
def _worker(local_rank: int, world_size: int, master_port: int) -> None:
# This module pulls in cute_dsl, which is unavailable off CUDA, so importing
# it at module level would fail collection. Import it where it is used, as
# `kda.py` does.
from vllm.models.kimi_k3.nvidia.ops.cute_dsl.gemm_rs import GemmRS
device = torch.device("cuda", local_rank)
torch.accelerator.set_device_index(device)
update_environment_variables(