[Fix] Snapshot req.prefix_indices when the prefix cache is disabled (#34644)

This commit is contained in:
Liangsheng Yin
2026-08-12 20:50:46 -07:00
committed by GitHub
parent a318e16956
commit 26627e999d
2 changed files with 2 additions and 2 deletions
@@ -519,7 +519,7 @@ class SWARadixCache(KVCacheEventMixin, BasePrefixCache):
]
# `req.prefix_indices` will be used in `PrefillAdder::add_chunked_req` later
req.prefix_indices = kv_indices
req.prefix_indices = kv_indices.to(dtype=torch.int64, copy=True)
return
token_ids = req.get_fill_ids()
@@ -749,7 +749,7 @@ class UnifiedRadixCache(BasePrefixCache):
kv_indices = self.req_to_token_pool.req_to_token[
req.req_pool_idx, : len(token_ids)
]
req.prefix_indices = kv_indices
req.prefix_indices = kv_indices.to(dtype=torch.int64, copy=True)
return
kv_indices_orig = self.req_to_token_pool.req_to_token[