[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:
@@ -16,6 +16,7 @@ import pytest
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from vllm._custom_ops import fp32_router_gemm
|
from vllm._custom_ops import fp32_router_gemm
|
||||||
|
from vllm.platforms import current_platform
|
||||||
|
|
||||||
# (hidden_size, num_experts)
|
# (hidden_size, num_experts)
|
||||||
SHAPES = [(3072, 256), (6144, 128), (6144, 256)]
|
SHAPES = [(3072, 256), (6144, 128), (6144, 256)]
|
||||||
@@ -26,8 +27,10 @@ ATOL_BF16 = 2e-2 # bf16 activation has lower precision
|
|||||||
|
|
||||||
|
|
||||||
def _requires_sm90():
|
def _requires_sm90():
|
||||||
if not torch.cuda.is_available():
|
# ROCm reports a CUDA-like device capability (gfx950 -> (9, 5)), which would
|
||||||
pytest.skip("CUDA not available")
|
# 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()
|
major, minor = torch.cuda.get_device_capability()
|
||||||
if major * 10 + minor < 90:
|
if major * 10 + minor < 90:
|
||||||
pytest.skip(f"fp32_router_gemm requires SM90+, got SM{major}{minor}")
|
pytest.skip(f"fp32_router_gemm requires SM90+, got SM{major}{minor}")
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ from vllm.distributed.parallel_state import (
|
|||||||
init_distributed_environment,
|
init_distributed_environment,
|
||||||
initialize_model_parallel,
|
initialize_model_parallel,
|
||||||
)
|
)
|
||||||
from vllm.models.kimi_k3.nvidia.ops.cute_dsl.gemm_rs import GemmRS
|
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
from vllm.utils.network_utils import get_open_port
|
from vllm.utils.network_utils import get_open_port
|
||||||
from vllm.utils.system_utils import update_environment_variables
|
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:
|
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)
|
device = torch.device("cuda", local_rank)
|
||||||
torch.accelerator.set_device_index(device)
|
torch.accelerator.set_device_index(device)
|
||||||
update_environment_variables(
|
update_environment_variables(
|
||||||
|
|||||||
Reference in New Issue
Block a user