Skip to content

Commit 42b4756

Browse files
author
wangzaijun
committed
Fix
1 parent 99dd942 commit 42b4756

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

lightllm/common/infer_utils.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
from lightllm.common.basemodel.triton_kernel.copy_kv_index_to_req import copy_kv_index_to_req_prefill
22

33

4-
def init_req_to_token_indexes_old(
5-
req_to_token_indexs, b_req_idx, b_seq_len, b_ready_cache_len, max_len_in_batch, alloc_mem_index
6-
):
7-
start_index = 0
8-
b_seq_len_numpy = b_seq_len.cpu().numpy()
9-
b_ready_cache_len_numpy = b_ready_cache_len.cpu().numpy()
10-
b_req_idx_numpy = b_req_idx.cpu().numpy()
11-
for i in range(len(b_seq_len)):
12-
cur_seq_len = b_seq_len_numpy[i]
13-
cur_ready_cache_len = b_ready_cache_len_numpy[i]
14-
req_to_token_indexs[b_req_idx_numpy[i], cur_ready_cache_len:cur_seq_len] = alloc_mem_index[
15-
start_index : start_index + cur_seq_len - cur_ready_cache_len
16-
]
17-
start_index += cur_seq_len - cur_ready_cache_len
18-
return
19-
20-
214
def init_req_to_token_indexes(
225
req_to_token_indexs, b_req_idx, b_seq_len, b_ready_cache_len, b_start_loc, alloc_mem_index, max_q_seq_len
236
):

0 commit comments

Comments
 (0)