diff --git a/tests/kernels/attention/test_attention.py b/tests/kernels/attention/test_attention.py index 662e14a9bb..ef3a860eef 100644 --- a/tests/kernels/attention/test_attention.py +++ b/tests/kernels/attention/test_attention.py @@ -14,6 +14,8 @@ from vllm.platforms import current_platform from vllm.utils.mem_utils import get_max_shared_memory_bytes from vllm.utils.torch_utils import set_random_seed +pytestmark = pytest.mark.skip_global_cleanup + FLOAT32_BYTES = torch.finfo(torch.float).bits // 8 # This will change depending on the compute capability. # - 512 as a buffer diff --git a/tests/kernels/attention/test_cache.py b/tests/kernels/attention/test_cache.py index b6a029ce08..7b7317ebaa 100644 --- a/tests/kernels/attention/test_cache.py +++ b/tests/kernels/attention/test_cache.py @@ -12,6 +12,8 @@ from vllm.model_executor.layers.quantization.utils.quant_utils import scaled_deq from vllm.platforms import current_platform from vllm.utils.torch_utils import nvfp4_split_data_scale, set_random_seed +pytestmark = pytest.mark.skip_global_cleanup + COPYING_DIRECTION = [("cuda", "cpu"), ("cuda", "cuda"), ("cpu", "cuda")] DTYPES = [torch.bfloat16, torch.float] NUM_TOKENS = [42] # Arbitrary values for testing diff --git a/tests/kernels/attention/test_cutlass_mla_decode.py b/tests/kernels/attention/test_cutlass_mla_decode.py index c0e319a27a..067f66ebc4 100644 --- a/tests/kernels/attention/test_cutlass_mla_decode.py +++ b/tests/kernels/attention/test_cutlass_mla_decode.py @@ -11,6 +11,8 @@ from vllm.platforms import current_platform from vllm.triton_utils import triton from vllm.utils.platform_utils import num_compute_units +pytestmark = pytest.mark.skip_global_cleanup + def cal_diff( x: torch.Tensor, diff --git a/tests/kernels/attention/test_flashmla.py b/tests/kernels/attention/test_flashmla.py index 84744a81e7..3af59dd86f 100644 --- a/tests/kernels/attention/test_flashmla.py +++ b/tests/kernels/attention/test_flashmla.py @@ -16,6 +16,8 @@ from vllm.v1.attention.ops.flashmla import ( is_flashmla_dense_supported, ) +pytestmark = pytest.mark.skip_global_cleanup + def cal_diff( x: torch.Tensor, y: torch.Tensor, name: str, use_fp8: bool = False diff --git a/tests/kernels/attention/test_merge_attn_states.py b/tests/kernels/attention/test_merge_attn_states.py index 1394ea9df4..eeadf0da0b 100644 --- a/tests/kernels/attention/test_merge_attn_states.py +++ b/tests/kernels/attention/test_merge_attn_states.py @@ -15,6 +15,14 @@ from vllm.v1.attention.ops.triton_merge_attn_states import ( merge_attn_states as merge_attn_states_triton, ) +pytestmark = [ + pytest.mark.skip_global_cleanup, + pytest.mark.skipif( + not current_platform.is_cuda_alike(), + reason="merge_attn_states kernels require CUDA or ROCm.", + ), +] + # Naive PyTorch Implements section 2.2 of https://www.arxiv.org/pdf/2501.01005 # can be used to combine partial attention results (in the split-KV case) @@ -153,12 +161,6 @@ def test_merge_attn_states( input_dtype: torch.dtype, use_fp8: bool, ): - if not current_platform.is_cuda(): - pytest.skip( - "Currently only support compare triton merge_attn_states " - "with custom cuda merge_attn_states kernel" - ) - NUM_TOKENS = num_tokens NUM_HEADS = num_query_heads HEAD_SIZE = head_size diff --git a/tests/kernels/attention/test_prefix_prefill.py b/tests/kernels/attention/test_prefix_prefill.py index e2e9c4e8c2..e6d46d6efc 100644 --- a/tests/kernels/attention/test_prefix_prefill.py +++ b/tests/kernels/attention/test_prefix_prefill.py @@ -17,6 +17,8 @@ from vllm.v1.attention.ops.chunked_prefill_paged_decode import ( ) from vllm.v1.attention.ops.prefix_prefill import context_attention_fwd +pytestmark = pytest.mark.skip_global_cleanup + NUM_HEADS = [64] NUM_QUERIES_PER_KV = [1, 64] HEAD_SIZES = [24, 128] diff --git a/tests/kernels/attention/test_triton_decode_attention.py b/tests/kernels/attention/test_triton_decode_attention.py index b4b17d9b5c..5ac1d6cdcb 100644 --- a/tests/kernels/attention/test_triton_decode_attention.py +++ b/tests/kernels/attention/test_triton_decode_attention.py @@ -8,6 +8,8 @@ from vllm.platforms import current_platform from vllm.utils.math_utils import cdiv from vllm.v1.attention.ops.triton_decode_attention import decode_attention_fwd +pytestmark = pytest.mark.skip_global_cleanup + DEVICE_TYPE = current_platform.device_type diff --git a/tests/kernels/attention/test_triton_unified_attention.py b/tests/kernels/attention/test_triton_unified_attention.py index d3435ea665..1c1d4f803f 100644 --- a/tests/kernels/attention/test_triton_unified_attention.py +++ b/tests/kernels/attention/test_triton_unified_attention.py @@ -11,6 +11,8 @@ from vllm.utils.torch_utils import set_random_seed from vllm.v1.attention.ops.triton_unified_attention import unified_attention from vllm.v1.kv_cache_interface import KVQuantMode +pytestmark = pytest.mark.skip_global_cleanup + DEVICE_TYPE = current_platform.device_type NUM_HEADS = [(4, 4), (8, 2), (5, 1)] diff --git a/tests/kernels/attention/test_triton_unified_attention_diffkv.py b/tests/kernels/attention/test_triton_unified_attention_diffkv.py index 1a19cf3437..513811a09c 100644 --- a/tests/kernels/attention/test_triton_unified_attention_diffkv.py +++ b/tests/kernels/attention/test_triton_unified_attention_diffkv.py @@ -21,6 +21,8 @@ from vllm.v1.attention.ops.triton_unified_attention_diffkv import ( unified_attention_diffkv, ) +pytestmark = pytest.mark.skip_global_cleanup + DEVICE_TYPE = current_platform.device_type # (num_query_heads, num_kv_heads): MHA, GQA, and the num_kv_heads==1