[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}")