{"record":{"id":"9c019ab65f8b8d16","repo":"vllm-project/vllm","slug":"dcp-comm-backend-a2a-requires-decode-context-par","errorCode":null,"errorMessage":"dcp_comm_backend='a2a' requires decode_context_parallel_size > 1.","messagePattern":"dcp_comm_backend='a2a' requires decode_context_parallel_size > 1\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":542,"sourceCode":"        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\n\n    @property\n    def world_size_across_dp(self) -> int:\n        \"\"\"Process world size across TP, PCP, PP, and DP.\"\"\"\n        return self.world_size * self.data_parallel_size\n\n    @property\n    def use_ubatching(self) -> bool:\n        return self.enable_dbo or self.ubatch_size > 1\n\n    @property\n    def num_ubatches(self) -> int:\n        return 2 if self.enable_dbo else self.ubatch_size\n","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L524-L560","documentation":"The 'a2a' decode-context-parallel communication backend is an all-to-all implementation that only activates with more than one DCP rank. ParallelConfig rejects dcp_comm_backend='a2a' when decode_context_parallel_size <= 1, since there would be no cross-rank traffic to optimize.","triggerScenarios":"Setting --dcp-comm-backend a2a while decode_context_parallel_size is 1 (the default).","commonSituations":"Enabling the a2a backend from a performance tuning guide whose DCP flags were not also copied; disabling DCP for debugging but leaving the backend flag in place.","solutions":["Add --decode-context-parallel-size N with N > 1 to make a2a meaningful.","Or remove --dcp-comm-backend a2a / leave the default backend when running without DCP."],"exampleFix":"# before\nvllm serve model --dcp-comm-backend a2a\n# after\nvllm serve model --decode-context-parallel-size 2 --dcp-comm-backend a2a","handlingStrategy":"validation","validationCode":"def a2a_valid(dcp_comm_backend: str, dcp: int) -> bool:\n    return dcp_comm_backend != \"a2a\" or dcp > 1\n\nassert a2a_valid(\"a2a\", 2)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bind --dcp-comm-backend a2a and --decode-context-parallel-size > 1 into a single config fragment.","Remove backend-tuning flags whenever disabling the feature they tune."],"tags":["context-parallelism","communication-backend","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}