[Bugfix] Corrupted MLA + linear attention (#43961)

Signed-off-by: Thien Tran <[email protected]>
This commit is contained in:
Thien Tran
2026-05-29 05:00:51 -07:00
committed by GitHub
parent 0b56815a24
commit d2889722ff
+10 -2
View File
@@ -237,7 +237,11 @@ class SingleTypeKVCacheManager(ABC):
cdiv(num_total_computed_tokens, self.block_size) - len(req_blocks)
)
req_blocks.extend(allocated_blocks)
if type(self.kv_cache_spec) in (FullAttentionSpec, TQFullAttentionSpec):
if type(self.kv_cache_spec) in (
FullAttentionSpec,
TQFullAttentionSpec,
MLAAttentionSpec,
):
self.new_block_ids.extend(b.block_id for b in allocated_blocks)
def allocate_new_blocks(
@@ -265,7 +269,11 @@ class SingleTypeKVCacheManager(ABC):
else:
new_blocks = self.block_pool.get_new_blocks(num_new_blocks)
req_blocks.extend(new_blocks)
if type(self.kv_cache_spec) in (FullAttentionSpec, TQFullAttentionSpec):
if type(self.kv_cache_spec) in (
FullAttentionSpec,
TQFullAttentionSpec,
MLAAttentionSpec,
):
self.new_block_ids.extend(b.block_id for b in new_blocks)
return new_blocks