[NPU] support dsv32 radixcache on ascend (#17964)

This commit is contained in:
khalilzhk
2026-02-03 03:34:12 +08:00
committed by GitHub
parent 677f3c49da
commit b0a6d5244c
4 changed files with 16 additions and 2 deletions
@@ -628,7 +628,7 @@ class AscendAttnBackend(AttentionBackend):
if self.forward_metadata.actual_seq_lengths_q is not None:
actual_seq_qlen = self.forward_metadata.actual_seq_lengths_q
else:
actual_seq_qlen = torch.cumsum(forward_batch.seq_lens, dim=0)
actual_seq_qlen = torch.cumsum(forward_batch.extend_seq_lens, dim=0)
else:
if self.forward_metadata.actual_seq_lengths_q is None:
if (
@@ -221,6 +221,7 @@ class NPUMLATokenToKVPool(MLATokenToKVPool):
dtype=self.store_dtype,
device=self.device,
)
self.index_k_buffer = None
if self.index_head_dim is not None:
self.index_k_buffer = torch.zeros(
(