sgl-project/sglang · error · ValueError
--enable-dsa-cache-layer-split is not supported on decode wo
Error message
--enable-dsa-cache-layer-split is not supported on decode workers. This flag is a prefill-CP optimization; decode receives full cache shards through PD transfer.
What it means
--enable-dsa-cache-layer-split is a prefill context-parallel optimization for PD (prefill/decode disaggregated) deployments; decode workers receive full cache shards via PD transfer, so the flag is rejected on decode workers.
Source
Thrown at python/sglang/srt/server_args.py:5928
import torch
major, _ = torch.cuda.get_device_capability()
self._set_default_dsa_kv_cache_dtype(
major, resolved_view(self).quantization
)
self._set_default_dsa_backends(major)
if cfg.enable_prefill_cp:
assert (
cfg.disaggregation_mode != "decode"
), "CP is only supported for prefill when PD disaggregation, please remove --enable-prefill-cp."
if (
cfg.enable_dsa_cache_layer_split
and cfg.disaggregation_mode != "prefill"
):
if cfg.disaggregation_mode == "decode":
raise ValueError(
"--enable-dsa-cache-layer-split is not supported on "
"decode workers. This flag is a prefill-CP "
"optimization; decode receives full cache shards "
"through PD transfer."
)
raise ValueError(
"--enable-dsa-cache-layer-split is only supported on PD "
"prefill workers. Non-PD workers also run decode and "
"require ordinary local decode cache semantics."
)
if cfg.enable_dsa_cache_layer_split and (
not cfg.enable_prefill_cp or cfg.cp_strategy != "interleave"
):
raise ValueError(
"--enable-dsa-cache-layer-split requires "
"--enable-prefill-cp and --cp-strategy interleave "
"(or legacy --enable-nsa-prefill-context-parallel with "
"--nsa-prefill-cp-mode round-robin-split)."View on GitHub (pinned to 0132848349)
Solutions
- Remove --enable-dsa-cache-layer-split from decode worker launch args
- Keep the flag only on PD prefill workers
- Split your prefill/decode launch configs so flags are role-specific
Example fix
# before (decode worker) --disaggregation-mode decode --enable-dsa-cache-layer-split # after --disaggregation-mode decode
Defensive patterns
Strategy: validation
Validate before calling
mode = args.get("disaggregation_mode")
if args.get("enable_dsa_cache_layer_split") and mode == "decode":
args["enable_dsa_cache_layer_split"] = False # decode workers must not set it Prevention
- Render launch args per PD role (prefill vs decode) from separate templates
- Never apply prefill-only optimization flags cluster-wide
When it happens
Trigger: Launching with --disaggregation-mode decode together with --enable-dsa-cache-layer-split.
Common situations: Reusing the same flag set for prefill and decode pods in a PD cluster; deployment templates that inject DSA flags cluster-wide.
Related errors
- --enable-dsa-cache-layer-split is only supported on PD prefi
- --enable-dsa-cache-layer-split currently only supports the m
- PD decode DCP requires --disaggregation-transfer-backend moo
- SGLANG_DISAGG_STAGING_BUFFER requires disaggregation_transfe
- --enable-dsa-cache-layer-split is only supported for DSA (De
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/afbb410d01d64a5e.
Report an issue: GitHub.