{"record":{"id":"25dfd0fa7c7d0926","repo":"sgl-project/sglang","slug":"when-enabling-two-batch-overlap-without-an-ep-a2a","errorCode":null,"errorMessage":"When enabling two batch overlap without an EP a2a backend (moe_a2a_backend='none'), --enable-dp-attention is required (DeepSeek-V4 non-EP DP TBO path).","messagePattern":"When enabling two batch overlap without an EP a2a backend \\(moe_a2a_backend='none'\\), --enable-dp-attention is required \\(DeepSeek-V4 non-EP DP TBO path\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":10280,"sourceCode":"    def _check_two_batch_overlap(self):\n        # With no EP a2a backend, two-batch-overlap is only valid on the non-EP\n        # DP TP-MoE path (overlapping the DP all_gatherv / reduce_scatterv with\n        # the other ubatch's compute), which requires DP attention. Enabling it\n        # there needs no extra opt-in env flag.\n        cfg = resolving_view(self)\n\n        cp_tbo = (\n            is_hip()\n            and cfg.enable_dsa_prefill_context_parallel\n            and cfg.dsa_prefill_cp_mode == \"round-robin-split\"\n        )\n        if (\n            cfg.enable_two_batch_overlap\n            and cfg.moe_a2a_backend == \"none\"\n            and not cfg.enable_dp_attention\n            and not cp_tbo\n        ):\n            raise ValueError(\n                \"When enabling two batch overlap without an EP a2a backend \"\n                \"(moe_a2a_backend='none'), --enable-dp-attention is required \"\n                \"(DeepSeek-V4 non-EP DP TBO path).\"\n            )\n\n    def check_server_args(self):\n        cfg = resolving_view(self)\n\n        # Check parallel size constraints\n        if cfg.ep_join_mode != \"scale\":\n            assert (\n                cfg.tp_size * cfg.pp_size\n            ) % cfg.nnodes == 0, \"tp_size must be divisible by number of nodes\"\n\n        assert (\n            cfg.pp_max_micro_batch_size is None or cfg.pp_max_micro_batch_size >= 1\n        ), (\n            \"pp_max_micro_batch_size must be a positive integer or None (for auto-compute). \"","sourceCodeStart":10262,"sourceCodeEnd":10298,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L10262-L10298","documentation":"Raised in check_server_args when two-batch overlap (TBO) is enabled with moe_a2a_backend='none' (no EP all-to-all) and --enable-dp-attention is off and this is not the CP-TBO path. For the non-EP DeepSeek-V4 DP TBO path, DP attention is a prerequisite, so the combination is rejected.","triggerScenarios":"Launching with --enable-two-batch-overlay without --enable-dp-attention and without an EP a2a backend (default moe_a2a_backend='none'), outside the context-parallel TBO path.","commonSituations":"Enabling TBO for throughput on a single TP group without DP attention; copying TBO flags from an EP deployment to a non-EP one; upgrading where this constraint was introduced.","solutions":["Add --enable-dp-attention alongside TBO for the non-EP path","Or configure an EP a2a backend (e.g. --moe-a2a-backend deepep) instead","Or disable TBO if neither DP attention nor EP applies to your deployment"],"exampleFix":"# before\n--enable-two-batch-overlap\n# after\n--enable-two-batch-overlap --enable-dp-attention","handlingStrategy":"validation","validationCode":"if args.enable_two_batch_overlap and args.moe_a2a_backend == 'none':\n    assert args.enable_dp_attention or args.context_parallel_size and args.context_parallel_size > 1, \\\n        'non-EP TBO requires --enable-dp-attention'","typeGuard":null,"tryCatchPattern":"except ValueError as e:\n    if 'two batch overlap' in str(e):\n        args.enable_dp_attention = True  # retry with DP attention on","preventionTips":["Treat TBO flags as a bundle: TBO needs DP attention or an EP a2a backend","Don't copy EP-cluster flags verbatim into non-EP deployments"],"tags":["sglang","two-batch-overlap","dp-attention","moe","server-args"],"backgroundTag":"incompatible-feature-flags","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}