[DeepSeek-V4]support dspark c128 online compressor - #32035
BJWang-ant wants to merge 2 commits into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
7454b26 to
58ab97d
Compare
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
@Fridge003 HI could you help me to review code? |
b0c12c3 to
bffd427
Compare
|
Online c128 + DSpark + compact ragged verify crashes on first request. Setup: DSV4-Flash-0731 FP8, 4×H200, TP4, Crashes at RuntimeCheck(0 < extend_len && extend_len <= seq_len);Compact mode pads the batch to the CUDA graph bucket size, so idle requests have Fix: either filter out Workaround: turn off |
|
Tested this PR on our DSV4 + DSPARK production environment, crashes after serving traffic for a bit: NCCL: Cuda failure 'an illegal memory access was encountered' → exit 137 Bisected — confirmed this PR is the trigger. Env: 4x L20X TP, Spent some time digging in. Quick summary: all online C128 kernel and pool changes are env-gated and don't activate without the env vars. The problem is in a few ungated changes.
The actual trigger is the The PR adds several Suspect the overflowing kernel is somewhere in the mooncake A2A dispatch/combine path, flashinfer_mxfp4 MoE workspace, or DSV4 compressor KV-score buffers. Haven't fully pinned it down yet — planning to run Workaround for now: revert just the |
…project#32035 sgl-project#33656 sgl-project#32183 sgl-project#33145) Applied PRs (latest from GitHub): sgl-project#33288 Indexer logits OOM fix sgl-project#30393 HiCache packed/sidecar draft caches sgl-project#31170 DPA prefix_affinity load balancing sgl-project#33795 DSpark compact ragged-verify CUDA graph JIT race sgl-project#32467 C128 plan-kernel warp barrier sgl-project#33865 DSpark x prefill CP unblock sgl-project#30371 SWA state pool sizing (storage page) sgl-project#33358 FlashMLA norm-rope K-tokens-per-block ILP sgl-project#33872 num_draft_tokens clamp + extend_len==0 skip (supersede sgl-project#32183) sgl-project#34002 Sidecar backup vacuously-successful fix (replaces sgl-project#33656, with tests) sgl-project#33862 Reclaim redundant host mirrors after storage backup sgl-project#31315 Avoid repeated Mooncake gets after stale hits sgl-project#32327 Q8KV8 sparse MLA prefill backend (flashmla_sparse_q8) sgl-project#31668 Fix sidecar pool life-time (use-after-free on prefetch abort) sgl-project#31195 TP0 verify-token-budget broadcast (adapted to get_schedule() API) Dropped (per user request or superseded): sgl-project#32771 IndexCache C4 top-k reuse — has bug sgl-project#32035 DSpark C128 online compressor — has bug sgl-project#33656 Superseded by sgl-project#34002 (same fix + unit tests) sgl-project#32183 Superseded by sgl-project#33872 (included in supersede PR) sgl-project#33145 Base f01f706 already has superior reasoning-effort profile system Conflicts resolved: sgl-project#31195: adapted to base get_schedule().disable_overlap_schedule API sgl-project#32327: path remapped jit_kernel/ -> kernels/jit/ and kernels/ops/attention/ sgl-project#31668: applied cleanly on top of sgl-project#30393+sgl-project#34002+sgl-project#33862 modifications
…l-project#32035 ref sgl-project#33872) Ports the extend_len==0 idle/padded-request guard from the dsv4-merge sgl-project#33872 enhanced port (95d4b84) onto the upstream sgl-project#33872 fix, preventing RuntimeCheck(0<extend_len) regression in compact ragged verify.
…to avoid latent OOB crash PR sgl-project#32035 (c128 online compressor) added ungated group record_stream calls in dspark_verify.py (record_stream_for_v2_verify, record_stream_each over input_ids/out_cache_loc) and dspark_worker_v2.py (record_stream_each over seq_lens/req_pool_indices). These defensive calls change the CUDA caching allocator's recycling pattern and expose a latent OOB/use-after-free in base code, crashing production DSpark+DSV4 with 'illegal memory access' (bisected by Leoyzen; see sgl-project#32035 comment 5216575591). base, dsv4-merge, and dsv4-9303e26-extra all run production-stable without these group calls (they keep the base single-line batch.seq_lens.record_stream). Restore the base single-line defensive form in dspark_worker_v2.py and drop the group calls + imports in dspark_verify.py, matching the proven-stable branch memory layout. The latent OOB remains in base and must be fixed upstream.
ok, i get it, could you please provide the command that caused the error? Previously, I conducted all my experiments on the B200. For the H200, I need to verify it again. |
|
@BJWang-ant Repro info below. Note the key finding first: the crash does not need the c128 env vars. Our bisect landed on this PR with a default DSpark config ( They shift the CUDA caching allocator's recycling pattern and expose a latent OOB/use-after-free in base code. So it should reproduce on B200 as well, though allocator layout differences may change timing. 1. Production crash:
|
1.I rebased the code on the latest main branch. Currently, using the following server and benchmark commands, I have not found the problem of illegal access to video memory as mentioned at b200. The max full token usage is 0.96,the duration of the benchmark test is approximately 70 minutes. benchmark command: The second issue is still being resolved by me. |
Gate DSpark online C128 with dedicated env support dspark-c128-online Gate DSpark online C128 with dedicated env update testbed fix sys bug fix cuda illegal memory access
|
@Leoyzen I have updated the code. You can test it locally to see if you can still reproduce the result. |
bffd427 to
35dec93
Compare

Motivation
support dspark c128 online compressor
using env SGLANG_OPT_USE_ONLINE_COMPRESS=1 and SGLANG_EXPERIMENTAL_ONLINE_C128_DSPARK=1 to open dspark c128 online compressor.
this is Precision test results.
after using c128-online-compressor full token size is 3167232.


before using c128-online-compressor full token size is 2553344.
CI States
Latest PR Test (Base): ❌ Run #32471432842
Latest PR Test (Extra): ❌ Run #32471432471
Latest PR Test (AMD ROCm 7.2): ❌ Run #32471432957