File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2476,11 +2476,11 @@ def kv_connector_no_forward(
24762476 return output
24772477
24782478def _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" :
You can’t perform that action at this time.
0 commit comments