diff --git a/tests/conftest.py b/tests/conftest.py index a18dbf58c803..6c815439edb8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -761,8 +761,7 @@ class VllmRunner: - `max_model_len`: Set to `1024` instead of `None` to reduce memory usage. - `block_size`: To reduce memory usage, set default to `64` if on XPU devices, otherwise default to `16`. - - `enable_chunked_prefill`: Set to `False` instead of `None` for - test reproducibility. + - `enable_chunked_prefill`: Set to `None` to support V1 tests. - `enforce_eager`: Set to `False` to test CUDA graph. """ @@ -779,7 +778,7 @@ def __init__( disable_log_stats: bool = True, tensor_parallel_size: int = 1, block_size: int = 16 if not torch.xpu.is_available() else 64, - enable_chunked_prefill: Optional[bool] = False, + enable_chunked_prefill: Optional[bool] = None, swap_space: int = 4, enforce_eager: Optional[bool] = False, **kwargs, diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index 709968004718..e5bce3d7e193 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -1529,6 +1529,9 @@ def _set_default_args_v1(self, usage_context: UsageContext, # for non-pooling tasks. # For pooling tasks the default is False if model_config.runner_type != "pooling": + if self.enable_chunked_prefill is False: + raise ValueError( + "Cannot disable chunked prefill for V1 engine.") self.enable_chunked_prefill = True if self.enable_prefix_caching is None: self.enable_prefix_caching = True