Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,16 @@ def _forward_prefill(
state_slot = final_pos = None
if is_unified_kv_triton():
repeats = ctx_lens.to(torch.int64)
num_tokens = sum(batch.extend_lens)
state_slot = torch.repeat_interleave(
batch.req_pool_indices.to(device=device, dtype=torch.int64), repeats
batch.req_pool_indices.to(device=device, dtype=torch.int64),
repeats,
output_size=num_tokens,
)
final_pos = torch.repeat_interleave(
(draft_seq_lens + ctx_lens - 1).to(torch.int64), repeats
(draft_seq_lens + ctx_lens - 1).to(torch.int64),
repeats,
output_size=num_tokens,
)
cache_loc = batch.out_cache_loc
token_indices = logits_output.hidden_states_token_indices
Expand Down
Loading