Skip to content

Commit 7cdd181

Browse files
committed
change position of block_size
1 parent b52daf0 commit 7cdd181

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/v1/worker/hpu_model_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,11 +2476,11 @@ def kv_connector_no_forward(
24762476
return output
24772477

24782478
def _make_src_and_dst_indices(
2479+
block_size: int,
24792480
src_block_ids: list[int],
24802481
dst_block_ids: list[int],
24812482
src_device: Union[torch.device, str],
24822483
dst_device: Union[torch.device, str],
2483-
block_size: int,
24842484
) -> tuple[torch.Tensor, torch.Tensor]:
24852485

24862486
for idx in range(len(src_block_ids)):
@@ -2532,11 +2532,12 @@ def copy_kv_blocks(
25322532
dst_device = next(iter(dst_kv_caches.values())).device
25332533

25342534
src_indices, dst_indices = _make_src_and_dst_indices(
2535+
block_size,
25352536
src_block_ids=src_block_ids,
25362537
dst_block_ids=dst_block_ids,
25372538
src_device=src_device,
25382539
dst_device=dst_device,
2539-
block_size)
2540+
)
25402541

25412542
for idx, (layer, kv_layer) in enumerate(src_kv_caches):
25422543
if direction == "h2d":

0 commit comments

Comments
 (0)