From 60417b4b744c371453eddcf5c8fa0f184418c957 Mon Sep 17 00:00:00 2001 From: Lucas Wilkinson Date: Mon, 27 Jul 2026 20:03:26 -0400 Subject: [PATCH] [Core][PCP] Select MRV2 when PCP is enabled (#50034) Signed-off-by: Lucas Wilkinson --- vllm/config/vllm.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index a7f185cad4..82ca8ea26a 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -557,6 +557,10 @@ class VllmConfig: if use_v2_model_runner is not None: return use_v2_model_runner + # PCP runtime support is implemented only by the V2 model runner. + if self.parallel_config.prefill_context_parallel_size > 1: + return True + # DSpark is implemented only by the V2 GPU model runner, and DeepSeek-V4 # is not otherwise a default-V2 architecture, so force V2 for it. If V2 # is unsupported for the rest of the config, _validate_v2_model_runner @@ -1460,6 +1464,11 @@ class VllmConfig: if self.use_v2_model_runner: self._validate_v2_model_runner() + elif self.parallel_config.prefill_context_parallel_size > 1: + raise ValueError( + "Prefill context parallelism requires Model Runner V2. " + "Remove VLLM_USE_V2_MODEL_RUNNER=0." + ) # Re-compute compile ranges after platform-specific config updates # (e.g., XPU may lower max_num_batched_tokens when MLA is enabled)