From eb3742c72af255a3f571baab989e7753707347c3 Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Sat, 13 Sep 2025 19:19:40 -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 3b2bf797b7c0e..e0584d94f8be1 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(x[-1] for x in cu_num_new_blocks), + max(len(x) for x in new_block_ids), dtype=torch.int32, device="cpu", pin_memory=self.pin_memory,