Files
02e55d2af3 [KV Cache] GLM-5.3-Flash: use the generic packed KV layout; CircularBufferSpec tail with speculative ring slots (#57169)
Signed-off-by: Yifan Qiao <yifanqiao@inferact.ai>
Signed-off-by: Dakai An <dakaian108@gmail.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
2026-10-09 15:48:37 -04:00

28 lines
985 B
Python

# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import pytest
from vllm.platforms import current_platform
@pytest.fixture(autouse=True)
def _mock_cpu_backend_block_sizes(monkeypatch):
"""Mock the CPU attention backend's kernel block-size declaration.
Connector unit tests exercise transfer logic, never the attention
kernel, and hard-code block_size=16. On CPU-only machines
`CPUAttentionBackend` declares `MultipleOf(32)` (#54042), so every
worker construction would fail in `select_common_block_size` before
reaching the code under test.
"""
if not current_platform.is_cpu():
return
from vllm.v1.attention.backend import MultipleOf
from vllm.v1.attention.backends.cpu_attn import CPUAttentionBackend
monkeypatch.setattr(
CPUAttentionBackend,
"get_supported_kernel_block_sizes",
staticmethod(lambda kv_cache_spec=None: [MultipleOf(16)]),
)