fix(v41): materialize CP request rows in select_compact_prefill

PR #42922 covered prefill_requests but the compact-candidate consume path
(DSpark draft consuming target candidates) still subscripted req_rows
directly, crashing with TypeError under CP8+DSpark5 prefill when
out_page_indices is set. Route through materialize_prefill_request_rows;
non-CP behavior unchanged (returns req_rows as-is).
This commit is contained in:
2026-10-20 12:10:08 +08:00
parent ef1a5955f3
commit 2087760ea8
@@ -578,7 +578,9 @@ def select_compact_prefill(
indices,
chunk.scores,
chunk.lens,
inputs.req_rows[chunk.tok] if inputs.out_page_indices is not None else None,
materialize_prefill_request_rows(inputs)[chunk.tok]
if inputs.out_page_indices is not None
else None,
req_to_token,
inputs.out_page_indices,
inputs.out_raw_indices,