From e47bb9970bb747caddf09dd5d5be3f3cc735844a Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Sat, 13 Sep 2025 19:19:07 -0700 Subject: [PATCH] fix Signed-off-by: Woosuk Kwon --- vllm/v1/worker/gpu_block_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/v1/worker/gpu_block_table.py b/vllm/v1/worker/gpu_block_table.py index 05d2b6fbe666f..3b2bf797b7c0e 100644 --- a/vllm/v1/worker/gpu_block_table.py +++ b/vllm/v1/worker/gpu_block_table.py @@ -118,7 +118,7 @@ class BlockTables: # no clear upper bound on the number of new blocks. new_block_ids_cpu = torch.empty( self.num_kv_cache_groups, - max(len(b) for b in new_block_ids), + max(x[-1] for x in cu_num_new_blocks), dtype=torch.int32, device="cpu", pin_memory=self.pin_memory,