[Bugfix] Generalize KV block zeroing to AttentionSpec (#51749)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Michael Goin
2026-08-11 12:13:09 -04:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 513f83e7ec
commit e3fe212eaf
4 changed files with 134 additions and 10 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ from vllm.v1.core.kv_cache_utils import KVCacheBlockCopy
from vllm.v1.kv_cache_interface import (
AttentionSpec,
EncoderOnlyAttentionSpec,
FullAttentionSpec,
KVCacheConfig,
KVCacheGroupSpec,
KVCacheSpec,
@@ -147,7 +146,7 @@ class KVBlockZeroer:
for group in attn_groups_iter:
spec = group.kv_cache_spec
if not isinstance(spec, FullAttentionSpec):
if not isinstance(spec, AttentionSpec):
continue
if group.kv_cache_group_id >= len(kernel_block_sizes):
continue