vllm-project/vllm · error · ValueError
PCP does not support data parallelism yet.
Error message
PCP does not support data parallelism yet.
What it means
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.
Source
Thrown at vllm/config/parallel.py:528
"EPLB requires tensor, prefill-context, or data parallelism, "
f"but got TP={self.tensor_parallel_size}, "
f"PCP={self.prefill_context_parallel_size}, "
f"DP={self.data_parallel_size}."
)
else:
if self.eplb_config.num_redundant_experts != 0:
raise ValueError(
"num_redundant_experts is set to "
f"{self.eplb_config.num_redundant_experts} but EPLB is not "
"enabled. Either enable EPLB or unset "
"num_redundant_experts."
)
tp = self.tensor_parallel_size
pcp = self.prefill_context_parallel_size
dcp = self.decode_context_parallel_size
if pcp > 1 and self.data_parallel_size > 1:
raise ValueError("PCP does not support data parallelism yet.")
if pcp == 1:
# DCP reuses the TP ranks when PCP is disabled.
if tp % dcp != 0:
raise ValueError(f"tp_size={tp} must be divisible by dcp_size={dcp}.")
elif dcp not in (1, pcp, tp * pcp):
raise ValueError(
"When PCP is enabled, DCP must be disabled, span the PCP "
"axis, or span the full TP x PCP axis. "
f"Got TP={tp}, PCP={pcp}, DCP={dcp}; valid DCP sizes are "
f"{sorted({1, pcp, tp * pcp})}."
)
if self.dcp_comm_backend == "a2a" and self.decode_context_parallel_size <= 1:
raise ValueError(
"dcp_comm_backend='a2a' requires decode_context_parallel_size > 1."
)
return selfView on GitHub (pinned to c794754062)
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.
Example fix
# before vllm serve model --prefill-context-parallel-size 2 --data-parallel-size 2 # after vllm serve model --prefill-context-parallel-size 2 --data-parallel-size 1
Defensive patterns
Strategy: validation
Validate before calling
def pcp_dp_valid(pcp: int, dp: int) -> bool:
return pcp <= 1 or dp <= 1
assert pcp_dp_valid(1, 4) Prevention
- 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'.
When it happens
Trigger: Launching with both --prefill-context-parallel-size > 1 (e.g. via --enable-prefix-caching style PCP flags) and --data-parallel-size > 1.
Common situations: Long-context deployments adding DP for throughput on top of an existing PCP config; upgrading vLLM and combining previously separate feature flag sets.
Related errors
- data_parallel_size_local ({self.data_parallel_size_local}) m
- data_parallel_external_lb can only be set when data_parallel
- tp_size={tp} must be divisible by dcp_size={dcp}.
- When PCP is enabled, DCP must be disabled, span the PCP axis
- data parallel rank {rank} is not connected to this frontend;
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/d172e4fffc856c3a.
Report an issue: GitHub.