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 13, 04:30 UTC
[Chore] Rename `SchedulerConfig.chunked_prefill_enabled` (#28735)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Nov 15, 2025 at 02:39 UTC
e2741f6cbce6dc4c364d0a8d77375259d72a21ef
9 files changed
+21
-19
tests/v1/core/test_scheduler.py
-1
@@ -2282,7 +2282,6 @@ def _validate_chunked_prefill_settings_for_encoder_decoder(
2282
) -> None:
2283
"""Validate chunked prefill settings in the scheduler config for
2284
encoder-decoder models."""
2285
- assert scheduler_config.chunked_prefill_enabled is expect_enabled
2285
assert scheduler_config.enable_chunked_prefill is expect_enabled
2286
if is_encoder_decoder:
2287
# Encoder-decoder models should automatically disable chunked multimodal
tests/v1/e2e/test_spec_decode.py
+4
-6
@@ -272,7 +272,7 @@ def test_speculators_model_integration(
272
273
274
@pytest.mark.parametrize(
275
- ["model_setup", "mm_enabled", "chunked_prefill_enabled"],
275
+ ["model_setup", "mm_enabled", "enable_chunked_prefill"],
276
[
277
(("eagle3", "Qwen/Qwen3-8B", "AngelSlim/Qwen3-8B_eagle3", 1), False, False),
278
pytest.param(
@@ -358,7 +358,7 @@ def test_eagle_correctness(
358
sampling_config: SamplingParams,
359
model_setup: tuple[str, str, str, int],
360
mm_enabled: bool,
361
- chunked_prefill_enabled: bool,
361
+ enable_chunked_prefill: bool,
362
attn_backend: str,
363
):
364
if attn_backend == "TREE_ATTN":
@@ -396,9 +396,7 @@ def test_eagle_correctness(
396
397
method, model_name, spec_model_name, tp_size = model_setup
398
max_model_len = 2048
399
- max_num_batched_tokens = max_model_len
400
- if chunked_prefill_enabled:
401
- max_num_batched_tokens = 128
399
+ max_num_batched_tokens = 128 if enable_chunked_prefill else max_model_len
400
401
ref_llm = LLM(
402
model=model_name, max_model_len=max_model_len, tensor_parallel_size=tp_size
@@ -420,7 +418,7 @@ def test_eagle_correctness(
418
},
419
max_model_len=max_model_len,
420
max_num_batched_tokens=max_num_batched_tokens,
423
- enable_chunked_prefill=chunked_prefill_enabled,
421
+ enable_chunked_prefill=enable_chunked_prefill,
422
)
423
spec_outputs = spec_llm.chat(test_prompts, sampling_config)
424
matches = 0
tests/v1/engine/test_engine_core.py
+1
-1
@@ -571,7 +571,7 @@ def test_encoder_instance_zero_kv_cache(
571
)
572
573
# Check 5: Verify chunked prefill is disabled
574
- assert not vllm_config.scheduler_config.chunked_prefill_enabled, (
574
+ assert not vllm_config.scheduler_config.enable_chunked_prefill, (
575
"Encoder instance should disable chunked prefill (no KV cache)"
576
)
577
vllm/config/scheduler.py
+8
-3
@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, ClassVar, Literal, cast
8
9
from pydantic import Field, field_validator, model_validator
10
from pydantic.dataclasses import dataclass
11
-from typing_extensions import Self
11
+from typing_extensions import Self, deprecated
12
13
from vllm.config.utils import config
14
from vllm.logger import init_logger
@@ -233,6 +233,11 @@ class SchedulerConfig:
233
)
234
235
@property
236
+ @deprecated(
237
+ "`SchedulerConfig.chunked_prefill_enabled` has been renamed to "
238
+ "`SchedulerConfig.enable_chunked_prefill`. "
239
+ "The old name will be removed in v0.12."
240
+ )
241
def chunked_prefill_enabled(self) -> bool:
242
return self.enable_chunked_prefill
243
@@ -244,7 +249,7 @@ class SchedulerConfig:
249
def _verify_args(self) -> Self:
250
if (
251
self.max_num_batched_tokens < self.max_model_len
247
- and not self.chunked_prefill_enabled
252
+ and not self.enable_chunked_prefill
253
):
254
raise ValueError(
255
f"max_num_batched_tokens ({self.max_num_batched_tokens}) is "
@@ -271,7 +276,7 @@ class SchedulerConfig:
276
)
277
278
if self.max_num_partial_prefills > 1:
274
- if not self.chunked_prefill_enabled:
279
+ if not self.enable_chunked_prefill:
280
raise ValueError(
281
"Chunked prefill must be enabled to set "
282
"max_num_partial_prefills > 1."
vllm/config/vllm.py
+3
-3
@@ -411,7 +411,7 @@ class VllmConfig:
411
412
if (
413
self.model_config is not None
414
- and self.scheduler_config.chunked_prefill_enabled
414
+ and self.scheduler_config.enable_chunked_prefill
415
and self.model_config.dtype == torch.float32
416
and current_platform.get_device_capability() == (7, 5)
417
):
@@ -584,7 +584,7 @@ class VllmConfig:
584
):
585
for reason in disable_chunked_prefill_reasons:
586
logger.info(reason)
587
- self.scheduler_config.chunked_prefill_enabled = False
587
+ self.scheduler_config.enable_chunked_prefill = False
588
self.scheduler_config.long_prefill_token_threshold = 0
589
590
if self.cache_config is not None:
@@ -1026,7 +1026,7 @@ class VllmConfig:
1026
f"seed={self.model_config.seed}, "
1027
f"served_model_name={self.model_config.served_model_name}, "
1028
f"enable_prefix_caching={self.cache_config.enable_prefix_caching}, "
1029
- f"chunked_prefill_enabled={self.scheduler_config.chunked_prefill_enabled}, " # noqa
1029
+ f"enable_chunked_prefill={self.scheduler_config.enable_chunked_prefill}, " # noqa
1030
f"pooler_config={self.model_config.pooler_config!r}, "
1031
f"compilation_config={self.compilation_config!r}"
1032
)
vllm/platforms/cpu.py
+1
-1
@@ -192,7 +192,7 @@ class CpuPlatform(Platform):
192
193
scheduler_config = vllm_config.scheduler_config
194
if (
195
- scheduler_config.chunked_prefill_enabled
195
+ scheduler_config.enable_chunked_prefill
196
or cache_config.enable_prefix_caching
197
) and cache_config.cache_dtype != "auto":
198
raise RuntimeError(
vllm/v1/core/sched/scheduler.py
+1
-1
@@ -497,7 +497,7 @@ class Scheduler(SchedulerInterface):
497
# chunked prefill has to be enabled explicitly to allow
498
# pooling requests to be chunked
499
if (
500
- not self.scheduler_config.chunked_prefill_enabled
500
+ not self.scheduler_config.enable_chunked_prefill
501
and num_new_tokens > token_budget
502
):
503
self.waiting.pop_request()
vllm/v1/engine/core.py
+1
-1
@@ -124,7 +124,7 @@ class EngineCore:
124
# Encoder models without KV cache don't support
125
# chunked prefill. But do SSM models?
126
logger.info("Disabling chunked prefill for model without KVCache")
127
- vllm_config.scheduler_config.chunked_prefill_enabled = False
127
+ vllm_config.scheduler_config.enable_chunked_prefill = False
128
129
scheduler_block_size = (
130
vllm_config.cache_config.block_size
vllm/v1/worker/gpu_model_runner.py
+2
-2
@@ -2031,7 +2031,7 @@ class GPUModelRunner(
2031
2032
supported_tasks = list(model.pooler.get_supported_tasks())
2033
2034
- if self.scheduler_config.chunked_prefill_enabled:
2034
+ if self.scheduler_config.enable_chunked_prefill:
2035
if "token_embed" in supported_tasks:
2036
supported_tasks.remove("token_embed")
2037
if "token_classify" in supported_tasks:
@@ -3825,7 +3825,7 @@ class GPUModelRunner(
3825
supported_pooling_tasks = self.get_supported_pooling_tasks()
3826
3827
if not supported_pooling_tasks:
3828
- if self.scheduler_config.chunked_prefill_enabled:
3828
+ if self.scheduler_config.enable_chunked_prefill:
3829
raise RuntimeError(
3830
f"Model {self.model_config.model} does not support "
3831
"any pooling tasks with chunked prefill enabled. "