Repository navigation
Re-land dp-attention local control broadcast test - #39835
Merged
Merged
Conversation
Collaborator
Author
|
/rerun-test test/registered/e2e/dp_attn/test_dp_attention_local_control_broadcast.py |
Contributor
|
Results for 🚀 |
Contributor
|
Results for 🚀 |
Leoyzen
added a commit
to Leoyzen/sglang
that referenced
this pull request
Sep 18, 2026
[Unified Cache][9/N] add opt-in MLA load deduplication for Mooncake Linker. Squashes 5 upstream commits (cc4431b, 455f5bb, 310b76e, 8acfd72, d52e749 — three of them merge-main commits whose only net effect on this PR's files is what lands below). New opt-in flag --enable-linker-mla-dedup: with the Mooncake external linker, rank 0 loads replicated MLA KV from L3 and broadcasts each layer to the other TP ranks instead of every rank reading the same objects. Files: - python/sglang/srt/arg_groups/fields/memory.py: add enable_linker_mla_dedup. - python/sglang/srt/arg_groups/hicache_hook.py: require the Mooncake linker. - python/sglang/srt/mem_cache/unified_cache/linker_mla_dedup.py (new): LinkerMLADedupBroadcaster, adapting hybrid device-pool geometry to the existing MLAHostDedupBroadcaster primitive. - python/sglang/srt/mem_cache/storage/mooncake_store/mooncake_direct_linker.py: LayerWiseLoadCounter on_layer_ready hook; broadcaster construction; per-batch logical-plan all_gather gate; rank-0-only load queueing; forward-stream broadcasts; broadcast-completion event tracking in num_completed_loads; reset/close teardown. - test/registered/unit/server_args/test_server_args.py: flag validation test. Manual merge notes: - Our fork's mooncake_direct_linker.py carries fork-local behavior (fail-soft revalidate_load, retrying session start, SGLANG_LINKER_DEBUG_KEY probes, idx-checksum probe, rank-key handling). All of it is preserved untouched; the upstream hunks apply around it (imports, LayerWiseLoadCounter, __init__ broadcaster wiring, num_completed_loads, start_layer_wise_loading, load_thread_func, reset/close). - The upstream branch was based on main before sgl-project#39835/sgl-project#39115/sgl-project#37474; those are unrelated to this PR's files (verified by diffing the PR range against the merge base), so the squash is a faithful net port. - Depends on MLAHostDedupBroadcaster and attn_tp_cache_group/tp_cache_group in CacheInitParams, both already present in our base (upstream parent == ours).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Re-lands #39437 by @sshleifer, reverted after
test_pause_resume_in_placefailed on its first scheduled full run. The test is correct. The failure comes from an assumption inPauseResumeInPlaceMixinthat this checkpoint does not satisfy.The mixin asserts every request returns non-empty text.
lmsys/sglang-ci-dsv3-testcan emit EOS as its first token, andskip_special_tokensthen leaves the response text empty.meta_infoon a failing request shows an otherwise normal lifecycle:finish_reason: {"type": "stop", "matched": 1},completion_tokens: 1,num_retractions: 0,e2e_latency: 0.03s.Pause and resume are not involved. Against a single server on 4x H200, the same 32 requests fired without any pause produced 1, 1 and 3 empty responses over three rounds, and with pause produced 1, 3 and 1. The two configurations behave the same.
The mixin already depends on requests still decoding when the pause window opens, which is what
pause_max_new_tokens = 512and theincrease pause_max_new_tokens to make the test meaningfulassertion exist for.max_new_tokensis only a ceiling, so a request that stops early silently escapes that intent.pause_ignore_eosmakes the premise hold on checkpoints that can stop on the first token.The other two users of the mixin,
test_scheduler_control.pyandtest_disaggregation_basic.py, runmeta-llama/Llama-3.1-8B-Instructand keep the defaultpause_ignore_eos = False.SamplingParams.ignore_eosalready defaults toFalse, so the requests they send are unchanged.Verified on 4x H200 with
--tp 4 --dp 2 --enable-dp-attention, runningtest_pause_resume_in_placealone: 4 failures in 8 runs before the change, 6 passes in 6 runs after.CI States
Latest PR Test (Base): 🚫 Run #35130346305
Latest PR Test (Extra): ❌ Run #35130346267
Latest PR Test (AMD ROCm 10): ❌ Run #35130346020