[Fix] Assert the page-aligned SWA evict floor on both PD decode prealloc paths (#35396)
This commit is contained in:
@@ -1766,7 +1766,12 @@ def alloc_for_decode_prealloc(
|
||||
swa_tail_len=swa_tail_len,
|
||||
**extra_kwargs,
|
||||
)
|
||||
req.kv.swa_evicted_seqlen = fill_len - swa_tail_len
|
||||
swa_evicted_seqlen = fill_len - swa_tail_len
|
||||
assert (
|
||||
swa_evicted_seqlen >= 0
|
||||
and swa_evicted_seqlen % allocator.page_size == 0
|
||||
)
|
||||
req.kv.swa_evicted_seqlen = swa_evicted_seqlen
|
||||
else:
|
||||
kv_loc = allocator.alloc_extend(
|
||||
prefix_lens=torch.tensor(
|
||||
|
||||
Reference in New Issue
Block a user