Avoid scattered assignment of extend_input_len and fill_len by merging them into Req.extend_range (#27610)

This commit is contained in:
fzyzcjy
2026-06-25 08:33:28 +08:00
committed by GitHub
parent 6c839368e0
commit d0524d6433
14 changed files with 107 additions and 66 deletions
+3 -2
View File
@@ -96,9 +96,10 @@ class TestForwardSplitPrefill(CustomTestCase):
sampling_params=sampling_params,
)
req.full_untruncated_fill_ids = req.origin_input_ids
req.fill_len = len(req.full_untruncated_fill_ids)
req.logprob_start_len = -1
req.set_extend_input_len(req.fill_len - len(req.prefix_indices))
req.set_extend_range(
len(req.prefix_indices), len(req.full_untruncated_fill_ids)
)
reqs.append(req)
# Create dummy tree_cache for tests (no prefix caching, just allocation)