sgl-project/sglang · error · ValueError
--dcp-comm-backend {cfg.dcp_comm_backend} only affects the d
Error message
--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}. What it means
--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.
Source
Thrown at python/sglang/srt/server_args.py:4262
seen_paths.add(model_path)
def _handle_pd_disaggregation(self):
from sglang.srt.arg_groups.pd_disaggregation_hook import (
handle_pd_disaggregation,
)
handle_pd_disaggregation(self)
def _handle_dcp_validation(self):
cfg = resolving_view(self)
if cfg.dcp_size < 1:
raise ValueError(
"Decode context parallel size (--dcp-size / "
"--decode-context-parallel-size) must be >= 1, but got "
f"dcp_size={cfg.dcp_size}."
)
if cfg.dcp_comm_backend in ("a2a", "fi_a2a") and cfg.dcp_size <= 1:
raise ValueError(
f"--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 "
f"got dcp_size={cfg.dcp_size}."
)
if cfg.dcp_comm_backend == "fi_a2a" and not is_cuda():
raise ValueError(
"--dcp-comm-backend fi_a2a delegates the exchange to FlashInfer's "
"MNNVL All-to-All kernel, which requires an NVIDIA CUDA platform "
"with SM90+ and MNNVL fabric memory (e.g. GB200 NVL72). The "
"authoritative fabric probe runs at model-runner init; use 'a2a' "
"or 'ag_rs' on clusters without MNNVL."
)
if cfg.dcp_replicate_q_proj:
if cfg.dcp_size <= 1:
raise ValueError("--dcp-replicate-q-proj requires --dcp-size > 1.")
if cfg.dcp_comm_backend not in ("a2a", "fi_a2a"):
raise ValueError(View on GitHub (pinned to 0132848349)
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.
Example fix
# before python -m sglang.launch_server --model m --dcp-comm-backend a2a # after python -m sglang.launch_server --model m --dcp-size 2 --dcp-comm-backend a2a
Defensive patterns
Strategy: validation
Validate before calling
if dcp_comm_backend in ('a2a', 'fi_a2a'):
assert dcp_size and dcp_size > 1, 'a2a backends require dcp_size > 1' Type guard
def dcp_backend_config_ok(backend: str, dcp_size: int) -> bool:
return backend not in ('a2a', 'fi_a2a') or dcp_size > 1 Prevention
- 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.
When it happens
Trigger: Passing --dcp-comm-backend a2a (or fi_a2a) together with --dcp-size 1 or omitting --dcp-size entirely.
Common situations: 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.
Related errors
- Decode context parallel size (--dcp-size / --decode-context-
- Kimi-K3 DCP with decode_attention_backend='cutedsl_mla' requ
- Kimi-K3 DCP with decode_attention_backend='cutedsl_mla' requ
- Decode attention backend for Kimi-K3 DCP must be 'cutedsl_ml
- PD decode DCP requires --disaggregation-transfer-backend moo
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/ece937cdd11df6ea.
Report an issue: GitHub.