Repository navigation
[Perf] deepseek-v4.1: Check request-window SWA history without per-layer host syncs - #45223
Merged
Merged
Conversation
hnyls2002
requested review from
Ying1123,
alphabetc1,
hanming-lu,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
October 19, 2026 20:07
Collaborator
Author
|
/rerun-test test_dsv41_request_window_copy.py test_deepseek_v41_flash_gb300_encoder_bcg.py registered/attention/unittests/dsv4/test_deepseek_v4.py test_q8kv8_sparse_prefill_backend.py test_encoder_swa_replay.py test_dsv4_compressed_pools.py test_invariants.py test_dsv41_late_layer_tail_readers.py |
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
|
🚀 🚀 🚀 🚀 |
Open
5 tasks
chaohu2000
added a commit
to flytiger-eco/sglang-for-sail
that referenced
this pull request
Oct 27, 2026
…yer host syncs (sgl-project#45223) (cherry picked from commit 543002de921db17333cba2cbc58081ecef480279)
4 of 5 tasks
listar2000
pushed a commit
to listar2000/miles
that referenced
this pull request
Oct 30, 2026
…e host every layer [fork fix-067] RequestWindow checked that the SWA history the replay expects is present with torch.equal on a masked gather, once per layer per prefill: a device-to-host sync each time. SGLang's change (#45223) makes it a device-side invariant (sglang.srt.utils.invariants, already at our pin) that stays fatal under strict checking. Patch page: fork/patches/fix-065-sglang-swa-fixes.md Fork-Fix: fix-067 Touches: sglang:python/sglang/srt/mem_cache/dsv41_request_window.py Evidence: sgl-project/sglang#45223 (main 8b1d1e0d7); prefill time in the 1-node A/B on this branch's image Upstream-Status: merged in sgl-project/sglang main 80afdc128 (8b1d1e0d7, #45223); not on sglang-miles 5403606db9 Remove-When: SGLANG_COMMIT includes sgl-project/sglang 8b1d1e0d7 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
RequestWindow.bufferchecked each SWA layer's history before use with boolean-mask indexing andtorch.equal: three host syncs per SWA layer per extend step, so the scheduler could not run ahead of the GPU.utils/invariants.py):expecton adsv41.swa_history_presentinvariant (FATAL_CONTAINABLE), soSGLANG_INVARIANT_CHECKdecides it: off in production (no detection), a throttled count and log at WARN, a device-side assert at STRICT.SGLANG_INVARIANT_CHECKoff (the default), servers no longer check SWA history; CI runs at STRICT and still fails on a missing history.RequestWindow.buffer.test_dsv41_request_window_copy.pypasses. A one-off GPU script confirmed: matching history passes at STRICT; missing history passes at OFF and tripsinvariant-check FAILED [dsv41.swa_history_present]at STRICT.CI States
Latest PR Test (Base): 🚫 Run #39318746765
Latest PR Test (Extra): ❌ Run #39318746634
Latest PR Test (AMD ROCm 10): 🚫 Run #39318746757