[Auto Sync] Update schedule_batch.py, schedule_policy.py, b... (20251122) (#13763)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hanming Lu <69857889+hanming-lu@users.noreply.github.com>
Co-authored-by: Hanming Lu <hanming@x.ai>
This commit is contained in:
Lianmin Zheng
2025-11-24 14:33:31 -08:00
committed by GitHub
parent 9dc15d8569
commit e83bd1fadc
7 changed files with 51 additions and 19 deletions

View File

@@ -762,12 +762,7 @@ class Req:
token_ids = self.fill_ids[:max_prefix_len]
if tree_cache is not None:
(
self.prefix_indices,
self.last_node,
self.last_host_node,
self.host_hit_length,
) = tree_cache.match_prefix(
match_result = tree_cache.match_prefix(
key=RadixKey(token_ids=token_ids, extra_key=self.extra_key),
**(
{"req": self, "cow_mamba": True}
@@ -775,6 +770,17 @@ class Req:
else {}
),
)
(
self.prefix_indices,
self.last_node,
self.last_host_node,
self.host_hit_length,
) = (
match_result.device_indices,
match_result.last_device_node,
match_result.last_host_node,
match_result.host_hit_length,
)
self.cache_protected_len = len(self.prefix_indices)
self.extend_input_len = len(self.fill_ids) - len(self.prefix_indices)