[Core] MRV2 support for fast-prefill (#56145)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-09-10 10:36:04 -07:00
committed by GitHub
parent 7470082f57
commit e6cb56337b
12 changed files with 233 additions and 12 deletions
+7 -2
View File
@@ -626,8 +626,13 @@ def make_kv_sharing_fast_prefill_common_attn_metadata(
# Skip computing fast prefill path
return common_attn_metadata
assert common_attn_metadata.logits_indices_padded is not None
assert common_attn_metadata.num_logits_indices is not None
if (
common_attn_metadata.logits_indices_padded is None
or common_attn_metadata.num_logits_indices is None
):
# Fast prefill not armed for this step (e.g. cudagraph capture, or a
# pure-decode step): run the KV-sharing layers on the full batch.
return common_attn_metadata
logits_indices_padded = common_attn_metadata.logits_indices_padded
num_logits_indices = common_attn_metadata.num_logits_indices