{"record":{"id":"d172e4fffc856c3a","repo":"vllm-project/vllm","slug":"pcp-does-not-support-data-parallelism-yet","errorCode":null,"errorMessage":"PCP does not support data parallelism yet.","messagePattern":"PCP does not support data parallelism yet\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":528,"sourceCode":"                    \"EPLB requires tensor, prefill-context, or data parallelism, \"\n                    f\"but got TP={self.tensor_parallel_size}, \"\n                    f\"PCP={self.prefill_context_parallel_size}, \"\n                    f\"DP={self.data_parallel_size}.\"\n                )\n        else:\n            if self.eplb_config.num_redundant_experts != 0:\n                raise ValueError(\n                    \"num_redundant_experts is set to \"\n                    f\"{self.eplb_config.num_redundant_experts} but EPLB is not \"\n                    \"enabled. Either enable EPLB or unset \"\n                    \"num_redundant_experts.\"\n                )\n\n        tp = self.tensor_parallel_size\n        pcp = self.prefill_context_parallel_size\n        dcp = self.decode_context_parallel_size\n        if pcp > 1 and self.data_parallel_size > 1:\n            raise ValueError(\"PCP does not support data parallelism yet.\")\n        if pcp == 1:\n            # DCP reuses the TP ranks when PCP is disabled.\n            if tp % dcp != 0:\n                raise ValueError(f\"tp_size={tp} must be divisible by dcp_size={dcp}.\")\n        elif dcp not in (1, pcp, tp * pcp):\n            raise ValueError(\n                \"When PCP is enabled, DCP must be disabled, span the PCP \"\n                \"axis, or span the full TP x PCP axis. \"\n                f\"Got TP={tp}, PCP={pcp}, DCP={dcp}; valid DCP sizes are \"\n                f\"{sorted({1, pcp, tp * pcp})}.\"\n            )\n\n        if self.dcp_comm_backend == \"a2a\" and self.decode_context_parallel_size <= 1:\n            raise ValueError(\n                \"dcp_comm_backend='a2a' requires decode_context_parallel_size > 1.\"\n            )\n\n        return self","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L510-L546","documentation":"Prefill context parallelism (PCP) is not yet composable with data parallelism, so ParallelConfig raises when prefill_context_parallel_size > 1 and data_parallel_size > 1 simultaneously. This is a current implementation limitation, not a permanent rule.","triggerScenarios":"Launching with both --prefill-context-parallel-size > 1 (e.g. via --enable-prefix-caching style PCP flags) and --data-parallel-size > 1.","commonSituations":"Long-context deployments adding DP for throughput on top of an existing PCP config; upgrading vLLM and combining previously separate feature flag sets.","solutions":["Drop data parallelism (set --data-parallel-size 1) and keep PCP.","Or drop PCP (set prefill_context_parallel_size back to 1) and keep DP.","Track vLLM release notes; re-test the combination once PCP+DP support lands."],"exampleFix":"# before\nvllm serve model --prefill-context-parallel-size 2 --data-parallel-size 2\n# after\nvllm serve model --prefill-context-parallel-size 2 --data-parallel-size 1","handlingStrategy":"validation","validationCode":"def pcp_dp_valid(pcp: int, dp: int) -> bool:\n    return pcp <= 1 or dp <= 1\n\nassert pcp_dp_valid(1, 4)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose either PCP or DP for long-context throughput, not both, on current vLLM.","Re-check this constraint on each vLLM upgrade; it is an explicit 'not yet'."],"tags":["context-parallelism","data-parallel","parallelism","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}