Skip to content

Commit 6317a51

Browse files
authored
Categorize tests/kernels/ based on kernel type (#16799)
Signed-off-by: mgoin <mgoin64@gmail.com>
1 parent aa72d9a commit 6317a51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+79
-48
lines changed

.buildkite/lm-eval-harness/test_lm_eval_correctness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import pytest
1717
import yaml
1818

19-
RTOL = 0.05
19+
RTOL = 0.08
2020
TEST_DATA_FILE = os.environ.get(
2121
"LM_EVAL_TEST_DATA_FILE",
2222
".buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct.yaml")

.buildkite/test-pipeline.yaml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,46 @@ steps:
317317
commands:
318318
- pytest -v -s compile/test_full_graph.py
319319

320-
- label: Kernels Test %N # 1h each
321-
mirror_hardwares: [amd]
320+
- label: Kernels Core Operation Test
322321
source_file_dependencies:
323322
- csrc/
323+
- tests/kernels/core
324+
commands:
325+
- pytest -v -s kernels/core
326+
327+
- label: Kernels Attention Test %N
328+
source_file_dependencies:
329+
- csrc/attention/
324330
- vllm/attention
325-
- tests/kernels
331+
- vllm/v1/attention
332+
- tests/kernels/attention
326333
commands:
327-
- pytest -v -s kernels --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
328-
parallelism: 4
334+
- pytest -v -s kernels/attention --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
335+
parallelism: 2
336+
337+
- label: Kernels Quantization Test %N
338+
source_file_dependencies:
339+
- csrc/quantization/
340+
- vllm/model_executor/layers/quantization
341+
- tests/kernels/quantization
342+
commands:
343+
- pytest -v -s kernels/quantization --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT
344+
parallelism: 2
345+
346+
- label: Kernels MoE Test
347+
source_file_dependencies:
348+
- csrc/moe/
349+
- tests/kernels/moe
350+
- vllm/model_executor/layers/fused_moe/
351+
commands:
352+
- pytest -v -s kernels/moe
353+
354+
- label: Kernels Mamba Test
355+
source_file_dependencies:
356+
- csrc/mamba/
357+
- tests/kernels/mamba
358+
commands:
359+
- pytest -v -s kernels/mamba
329360

330361
- label: Tensorizer Test # 11min
331362
# mirror_hardwares: [amd]
File renamed without changes.

tests/kernels/test_attention.py renamed to tests/kernels/attention/test_attention.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
import pytest
77
import torch
88

9+
from tests.kernels.allclose_default import get_default_atol, get_default_rtol
910
from tests.kernels.utils import opcheck
1011
from vllm import _custom_ops as ops
1112
from vllm.platforms import current_platform
1213
from vllm.utils import get_max_shared_memory_bytes
1314

14-
from .allclose_default import get_default_atol, get_default_rtol
15-
1615
if not current_platform.is_rocm():
1716
from xformers import ops as xops
1817
from xformers.ops.fmha.attn_bias import BlockDiagonalCausalMask

tests/kernels/test_attention_selector.py renamed to tests/kernels/attention/test_attention_selector.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ def test_env(
156156
expected = ("TRITON_MLA_VLLM_V1"
157157
if use_v1 else "TRITON_MLA")
158158
assert backend.get_name() == expected
159+
elif name == "FLASHINFER":
160+
backend = get_attn_backend(16,
161+
torch.float16,
162+
torch.float16,
163+
block_size,
164+
False,
165+
use_mla=use_mla)
166+
expected = "FLASHINFER_VLLM_V1" if use_v1 else name
167+
assert backend.get_name() == expected
159168
else:
160169
backend = get_attn_backend(16,
161170
torch.float16,

tests/kernels/test_blocksparse_attention.py renamed to tests/kernels/attention/test_blocksparse_attention.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
import pytest
77
import torch
88

9+
from tests.kernels.allclose_default import get_default_atol, get_default_rtol
910
from vllm import _custom_ops as ops
1011
from vllm.attention.ops.blocksparse_attention.interface import (
1112
LocalStridedBlockSparseAttn)
1213
from vllm.platforms import current_platform
1314
from vllm.utils import get_max_shared_memory_bytes
1415

15-
from .allclose_default import get_default_atol, get_default_rtol
16-
1716
FLOAT32_BYTES = torch.finfo(torch.float).bits // 8
1817
# This will change depending on the compute capability.
1918
# - 512 as a buffer
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)