Fix evict swa for overlap scheduler and page size > 1 (#16507)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user