Fix DSpark and DP/EP - #33098
Fix DSpark and DP/EP#33098
Conversation
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com>
|
Same issue, this works for me. Tested the cumulative diff at |
|
/tag-and-rerun-ci |
JustinTong0323
left a comment
There was a problem hiding this comment.
Validated this fix end-to-end on 4x GB300 with DeepSeek-V4-Flash-0731. I cherry-picked the three fix commits onto the exact v0.5.16 base (fdebc938) where the first request previously crashed because original_global_num_tokens_cpu was missing, then launched TP4/DP4 with DP attention, DP LM head, FlashInfer MXFP4, and bundled DSpark.
Results:
- The target and draft CUDA graphs both completed all 27/27 tiers; the warmup, streaming request, and 32-request concurrent smoke test all passed, with no scheduler exception or CUDA/OOM error.
- The added DSpark DP-tier test passed: 5/5.
- Full GSM8K: 96.66% (1275/1319), 99.92% stop rate, 0 request errors.
- 8k input / 1k output serving benchmark, with 64 warmups and a separate cache flush before every case:
- c64: 16,248.70 total tok/s (4,062.18 tok/s/GPU), 1,857.75 output tok/s, 5.52 acceptance length. This is +10.73% versus TP4 + DSpark and +51.69% versus target-only DPA.
- c256: 26,868.24 total tok/s (6,717.06 tok/s/GPU), 3,015.63 output tok/s, 5.47 acceptance length. This is +54.67% versus TP4 + DSpark and +33.55% versus target-only DPA.
This confirms that the patch fixes the previously broken DSpark + DP-attention path and makes it the strongest measured throughput-oriented configuration. TP4 + DSpark still has better latency at c64, and this result does not cover DSpark with PD disaggregation.
|
/rerun-failed-ci |
|
Same issue here. This patch works for me with DeepSeek-V4-Flash, DSpark, and DPA2 on 2x B300. Target and draft CUDA Graph capture completed with decode backend=full, two concurrent generation requests returned HTTP 200, both DP ranks reported cuda graph: True, and the pod stayed Ready with 0 restarts. |
|
@JustinTong0323 Hi ! |
Just pinged code owner to take a look |
…utation, sgl-project#471/sgl-project#33407/sgl-project#33312/sgl-project#33098/sgl-project#33271 ports, sgl-project#481 PP fixes Eight commits, largest bundle this session: - sgl-project#479 (two commits): the GGUF-MoE offload coverage test and its refusal message named MXFP4/type 39 as THE example of a ggml type with no MoE kernel -- sgl-project#398 made that false (type 39 has a full native kernel set on a wheel that carries it). Traced the ACTIVE DSV4-Flash MXFP4 path end to end and confirmed it is native, not an untraced fallback; the refusal message now names the layer's own declared types instead of a stale hardcoded example, so it cannot go stale again the same way. docs/dev/NOTE_479_mxfp4_active_driver_path.md has the trace. - sgl-project#471: ports upstream sglang#32320 -- mask the SM120 SWA page-split to touched pages only, instead of the full page range. docs/dev/TICKET_471_masked_page_split.md. - sgl-project#33407 port: SM120 sparse-MLA buckets the topk width instead of using it unbucketed, falling back to Triton outside the bucketed range. - sgl-project#33312 port: DSpark draft head resolves and loads fused shared experts. - sgl-project#33098 port: DSpark draft fills the EP token-accounting fields. - sgl-project#481: three pipeline-parallel defects from the sgl-project#445 window fixed in server_args.py/resident_fraction.py/expert_stats.py. - sgl-project#33271 port: auto-round GPTQ MoE completes the MoeWNA16 delegation. FEATURE_CATALOG.md §8 conflict-risk as flagged, but no actual conflict -- this branch's base (a5eff26) is now several merges behind (sgl-project#520, sgl-project#523, design-453 landed since), yet none of those touched §8, so git's 3-way merge combined everything automatically. All 17 sections and all 22 previously-preserved additive paragraphs verified present. **Explicit verification requested and confirmed**: the two "ancient pre-existing" failures in tests/moe_offload/test_gguf_moe_offload.py (test_materialize_declines_uncovered_ggml_type, test_guard_still_refuses_an_unstaged_gguf_layer) that this session bisected back to before this session even began -- sgl-project#479's fix to expert_offload.py and the type-39 assumption in gguf.py directly addresses their root cause. Full file run: 20 passed, 0 failed, both confirmed GREEN now. One test-isolation quirk found and run to ground, not a code bug: the three flash_mla test files this branch adds/touches (test_flash_mla_backends.py, test_flash_mla_page_split_mask_471.py, test_flash_mla_sm120_topk_buckets.py) interfere with each other when run in the same pytest process -- a shared Triton-decorated function object resolves to JITFunction instead of the expected InterpretedFunction once another file in the same process has already imported flash_mla_sm120.py under real (non-interpret) conditions. Verified this is NOT a merge regression: reproduced identically on the unmerged branch tip in isolation (fresh archive, no other code involved), and every one of the 30 tests across the three files passes cleanly when its file is run alone. Branch-inherent test-ordering fragility, not in scope for this merge to fix. Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree): - tests/moe_offload/test_gguf_moe_offload.py alone: 20 passed (was 18 passed/2 failed before this merge, per this session's own bisection). - The eight new/touched test files, run individually where the isolation quirk above requires it: all pass in full (dspark 442: 18; auto_round: 17; dspark shared-expert 33312: 21; gguf mxfp4 479: 18; pp defects 481: 26; flash_mla backends/topk-buckets/page-split-mask: 10/25/10 each alone). - test/registered/unit/quantization/ + unit/models/ + spec/dspark/: 28 failed both before and after (diffed by test ID, not count -- the pre-merge archive showed 35 because 7 of its failures were an artifact of an incomplete git-archive extraction missing sgl-kernel/, confirmed by re-checking those 7 IDs against the working tree directly). The remaining 28 are dspark_kernel_parity's CUDA-only subtests plus test_gguf_dequant_scratch_budget.py, both pre-named as pre-existing. - test/registered/unit/layers/ + tests/moe_offload/: 3 failed (the pre-named test_deterministic_fp8_gemm.py x2 + test_flashinfer_workspace_zeroing.py x1), 1168 passed -- confirms test_gguf_moe_offload.py's contribution to this count is now 0 failures. - test/registered/unit/distributed/ (full, server_args.py touched): 24 failed, byte-identical established baseline. - ruff check --select=F401,F821,UP037: 15 findings, all in expert_offload.py, all confirmed pre-existing (same set already verified at cc5a92e in the earlier sgl-project#494 merge) and outside this branch's two diff hunks (2112-2138, 2616-2648) -- auto_round.py and every other touched file clean. - codespell: clean on all 21 touched/added files.
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
|
Follow-up integration regression: #34410 now pins the DSpark PD-decode draft-input handoff on current This complements #33098 rather than duplicating it: #33098 fixed DSpark DP-attention draft |
Backport the functional part of upstream PR sgl-project#33098 (154f0ac) to the pre-refactor DraftBlockProposer layout. Preserve original global token counts and populate non-padded token metadata for DP-attention draft forwards.
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
Motivation
Fix DSpark with DP attention: its draft
ForwardBatchmissed metadata required by CUDA graph admission and EP token accounting, causing startup and first-request crashes.Modifications
Populate
original_global_num_tokens_cpuand non-padded token counts when DSpark constructs the draft batch, and add regression coverage.Accuracy Tests
verified on 4xH200 with:
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #30704262557
Latest PR Test (Extra): ❌ Run #30825602108