[Core] Simplify handling of scheduler_reserve_full_isl option (#41064)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-04-30 18:10:00 -07:00
committed by GitHub
parent a3c83ff2fd
commit dd5506a157
4 changed files with 30 additions and 58 deletions
+4 -2
View File
@@ -2568,7 +2568,9 @@ def test_can_fit_full_sequence_swa_cap_admits_long_prompt():
prompt_len = 32 * block_size
req = make_request("long", list(range(prompt_len)), block_size, sha256)
assert manager.can_fit_full_sequence(req)
assert (
manager.allocate_slots(req, block_size, full_sequence_must_fit=True) is not None
)
def test_can_fit_full_sequence_full_attention_still_gates_oversized():
@@ -2619,4 +2621,4 @@ def test_can_fit_full_sequence_full_attention_still_gates_oversized():
prompt_len = 16 * block_size
req = make_request("oversized", list(range(prompt_len)), block_size, sha256)
assert not manager.can_fit_full_sequence(req)
assert manager.allocate_slots(req, block_size, full_sequence_must_fit=True) is None
@@ -179,6 +179,7 @@ def get_fake_allocate_slots_fn(original_allocate_slots_fn: Callable):
num_external_computed_tokens: int = 0,
delay_cache_blocks: bool = False,
num_encoder_tokens: int = 0,
full_sequence_must_fit: bool = False,
):
ret = original_allocate_slots_fn(
self,
@@ -190,6 +191,7 @@ def get_fake_allocate_slots_fn(original_allocate_slots_fn: Callable):
num_external_computed_tokens,
delay_cache_blocks,
num_encoder_tokens,
full_sequence_must_fit,
)
if cur_step_action is not None:
cur_block_ids = self.coordinator.single_type_managers[0].req_to_blocks[