[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>
This commit is contained in:
Dakai An
2026-10-09 15:48:37 -04:00
committed by GitHub
co-authored by Yifan Qiao OpenAI Codex OpenAI Codex Lucas Wilkinson Claude Opus 5.5 Lucas Wilkinson
parent 3766a67a32
commit 02e55d2af3
83 changed files with 1280 additions and 1986 deletions
+1 -17
View File
@@ -12,40 +12,24 @@ if not current_platform.is_cuda_alike():
from vllm.v1.worker.block_table import ComputeSlotMappingKernel
@pytest.mark.parametrize(
("kv_cache_block_size", "blocks_per_kv_block", "block_size", "block_size_rep"),
[
(256, 1, 256, 16),
(256, 4, 64, 16),
(64, 1, 64, 16),
(8, 1, 8, 2),
(4, 1, 4, 2),
],
)
@pytest.mark.parametrize("kv_cache_block_size", [256, 64, 8, 4])
def test_compute_slot_mapping_warmup_matches_runtime_specializations(
kv_cache_block_size: int,
blocks_per_kv_block: int,
block_size: int,
block_size_rep: int,
) -> None:
kernel = ComputeSlotMappingKernel()
kwargs = dict(
kv_cache_block_size=kv_cache_block_size,
blocks_per_kv_block=blocks_per_kv_block,
total_cp_world_size=1,
total_cp_rank=0,
cp_kv_cache_interleave_size=1,
block_table_stride=32768,
block_size=block_size,
)
expected = kernel.CompileKey(
kv_cache_block_size=kv_cache_block_size,
blocks_per_kv_block=blocks_per_kv_block,
total_cp_world_size=1,
total_cp_rank=0,
cp_kv_cache_interleave_size=1,
block_table_stride=16,
block_size=block_size_rep,
)
assert kernel.dispatch(**kwargs) == expected