Fix evict swa for overlap scheduler and page size > 1 (#16507)

This commit is contained in:
Ke Bao
2026-01-06 22:29:40 +08:00
committed by GitHub
parent f959250f76
commit 02722b9113
5 changed files with 34 additions and 3 deletions
+8 -1
View File
@@ -540,9 +540,13 @@ class Req:
# for corss-endoder model
self.token_type_ids = token_type_ids
# The length of KV that have been removed in local attention chunked prefill
# The length of KV that have been removed in swa chunk cache
self.evicted_seqlen_local = 0
# The index of the extend / decode batch
self.extend_batch_idx = 0
self.decode_batch_idx = 0
# For multi-http worker
self.http_worker_ipc = http_worker_ipc
@@ -1470,6 +1474,8 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
req.req_pool_idx = req_pool_indices[i]
assert seq_len - pre_len == req.extend_input_len
req.extend_batch_idx += 1
# update req-level memory management fields
req.kv_committed_len = seq_len
req.kv_allocated_len = seq_len
@@ -1898,6 +1904,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
# Update req-level memory management fields
for req in self.reqs:
req.decode_batch_idx += 1
req.kv_committed_len += 1
req.kv_allocated_len += 1
+1
View File
@@ -646,6 +646,7 @@ class Scheduler(
enable_mamba_extra_buffer=server_args.enable_mamba_extra_buffer(),
pp_rank=self.pp_rank,
pp_size=self.pp_size,
chunked_prefill_size=server_args.chunked_prefill_size,
)
if (