A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[CI Failure] fix_test_auto_prefix_cache_support (#26053)
Signed-off-by: Huamin Li <3ericli@gmail.com>
Huamin Li committed
Oct 4, 2025 at 02:44 UTC
7d6b03381e236e592eb814ab10b6ccfadaeed610
2 files changed
+14
-7
tests/v1/core/test_scheduler.py
+2
-2
@@ -1917,7 +1917,7 @@ def test_priority_scheduling_preemption_when_out_of_kv():
1917
def test_chunked_prefill_disabled_for_encoder_decoder(
1918
enable_chunked_prefill: bool, is_encoder_decoder: bool,
1919
expect_enabled: bool) -> None:
1920
- """Validate that chunked prefill is appropriately disabled for
1920
+ """Validate that chunked prefill is appropriately disabled for
1921
encoder-decoder models."""
1922
scheduler_config = SchedulerConfig(
1923
enable_chunked_prefill=enable_chunked_prefill,
@@ -1942,7 +1942,7 @@ def test_chunked_prefill_disabled_for_encoder_decoder(
1942
def _validate_chunked_prefill_settings_for_encoder_decoder(
1943
scheduler_config: SchedulerConfig, is_encoder_decoder: bool,
1944
expect_enabled: bool) -> None:
1945
- """Validate chunked prefill settings in the scheduler config for
1945
+ """Validate chunked prefill settings in the scheduler config for
1946
encoder-decoder models."""
1947
assert scheduler_config.chunked_prefill_enabled is expect_enabled
1948
assert scheduler_config.enable_chunked_prefill is expect_enabled
vllm/config/vllm.py
+12
-5
@@ -396,10 +396,17 @@ class VllmConfig:
396
"try setting 'VLLM_WORKER_MULTIPROC_METHOD' "
397
"to 'spawn'.")
398
399
- # Disable prefix caching only if chunked prefill is explicitly disabled
400
- # (and not merely unset)
401
- if (self.scheduler_config.chunked_prefill_enabled is False
402
- or disable_chunked_prefill_reasons):
399
+ # Final off-switch for CP/APC:
400
+ # Disable for (a) collected blockers, (b) encoder–decoder, or
401
+ # (c) explicit CP=False when APC wasn't requested.
402
+ # Do NOT disable merely because the resolved CP flag is False.
403
+ apc_requested = (self.cache_config is not None
404
+ and self.cache_config.enable_prefix_caching)
405
+ if (disable_chunked_prefill_reasons
406
+ or (self.model_config is not None
407
+ and self.model_config.is_encoder_decoder)
408
+ or (self.scheduler_config.enable_chunked_prefill is False
409
+ and not apc_requested)):
410
for reason in disable_chunked_prefill_reasons:
411
logger.info(reason)
412
self.scheduler_config.chunked_prefill_enabled = False
@@ -668,7 +675,7 @@ class VllmConfig:
675
f"Model: {self.model_config.model}")
676
677
def compile_debug_dump_path(self) -> Optional[Path]:
671
- """Returns a rank-aware path for dumping
678
+ """Returns a rank-aware path for dumping
679
torch.compile debug information.
680
"""
681
if self.compilation_config.debug_dump_path is None: