{"record":{"id":"ece937cdd11df6ea","repo":"sgl-project/sglang","slug":"dcp-comm-backend-cfg-dcp-comm-backend-only-aff","errorCode":null,"errorMessage":"--dcp-comm-backend {cfg.dcp_comm_backend} only affects the decode context-parallel attention reduction and therefore requires --dcp-size / --decode-context-parallel-size > 1, but got dcp_size={cfg.dcp_size}.","messagePattern":"--dcp-comm-backend (.+?) only affects the decode context-parallel attention reduction and therefore requires --dcp-size / --decode-context-parallel-size > 1, but got dcp_size=(.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":4262,"sourceCode":"                seen_paths.add(model_path)\n\n    def _handle_pd_disaggregation(self):\n        from sglang.srt.arg_groups.pd_disaggregation_hook import (\n            handle_pd_disaggregation,\n        )\n\n        handle_pd_disaggregation(self)\n\n    def _handle_dcp_validation(self):\n        cfg = resolving_view(self)\n        if cfg.dcp_size < 1:\n            raise ValueError(\n                \"Decode context parallel size (--dcp-size / \"\n                \"--decode-context-parallel-size) must be >= 1, but got \"\n                f\"dcp_size={cfg.dcp_size}.\"\n            )\n        if cfg.dcp_comm_backend in (\"a2a\", \"fi_a2a\") and cfg.dcp_size <= 1:\n            raise ValueError(\n                f\"--dcp-comm-backend {cfg.dcp_comm_backend} only affects the \"\n                \"decode context-parallel attention reduction and therefore \"\n                \"requires --dcp-size / --decode-context-parallel-size > 1, but \"\n                f\"got dcp_size={cfg.dcp_size}.\"\n            )\n        if cfg.dcp_comm_backend == \"fi_a2a\" and not is_cuda():\n            raise ValueError(\n                \"--dcp-comm-backend fi_a2a delegates the exchange to FlashInfer's \"\n                \"MNNVL All-to-All kernel, which requires an NVIDIA CUDA platform \"\n                \"with SM90+ and MNNVL fabric memory (e.g. GB200 NVL72). The \"\n                \"authoritative fabric probe runs at model-runner init; use 'a2a' \"\n                \"or 'ag_rs' on clusters without MNNVL.\"\n            )\n        if cfg.dcp_replicate_q_proj:\n            if cfg.dcp_size <= 1:\n                raise ValueError(\"--dcp-replicate-q-proj requires --dcp-size > 1.\")\n            if cfg.dcp_comm_backend not in (\"a2a\", \"fi_a2a\"):\n                raise ValueError(","sourceCodeStart":4244,"sourceCodeEnd":4280,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L4244-L4280","documentation":"--dcp-comm-backend a2a/fi_a2a only affects the attention reduction across decode context-parallel ranks; with dcp_size <= 1 there is nothing to reduce, so _handle_dcp_validation rejects the combination as a contradictory config.","triggerScenarios":"Passing --dcp-comm-backend a2a (or fi_a2a) together with --dcp-size 1 or omitting --dcp-size entirely.","commonSituations":"Copy-pasting a DCP launch command and dropping the --dcp-size flag; enabling the backend 'for later' while running single-rank decode; leftover flags from a cluster config template.","solutions":["Set --dcp-size (or --decode-context-parallel-size) to a value > 1 when using a2a/fi_a2a.","Or remove --dcp-comm-backend if you are not actually running decode context parallelism."],"exampleFix":"# before\npython -m sglang.launch_server --model m --dcp-comm-backend a2a\n# after\npython -m sglang.launch_server --model m --dcp-size 2 --dcp-comm-backend a2a","handlingStrategy":"validation","validationCode":"if dcp_comm_backend in ('a2a', 'fi_a2a'):\n    assert dcp_size and dcp_size > 1, 'a2a backends require dcp_size > 1'","typeGuard":"def dcp_backend_config_ok(backend: str, dcp_size: int) -> bool:\n    return backend not in ('a2a', 'fi_a2a') or dcp_size > 1","tryCatchPattern":null,"preventionTips":["Treat --dcp-comm-backend as inseparable from --dcp-size > 1 in launch scripts.","Add a config linter that rejects dependent flags set without their enabler."],"tags":["server-args","dcp","comm-backend","parallelism","sglang"],"backgroundTag":"mutually-dependent-flags","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}