Repository navigation
[Perf] dsv41: Read Engram rows from peer device shards - #46180
Merged
Merged
Conversation
hnyls2002
requested review from
BBuf,
DarkSharpness,
Edwardf0t1,
Fridge003,
HaiShaw,
HydraQYH,
Ying1123,
celve,
ch-wan,
ispobock,
merrymercy and
yuan-luo
as code owners
October 23, 2026 23:51
…p_alloc; assert mapped; warn on host-table override
Collaborator
Author
|
/rerun-test registered/unit/test_cuda_vmm_utils.py registered/disaggregation/test_disaggregation_dwdp_gpt_oss.py registered/unit/layers/test_engram_history.py registered/unit/models/test_deepseek_v41_bcg_multimodal.py registered/unit/kernels/test_kernels_namespace.py registered/e2e/models/test_deepseek_v41_flash_gb300_dp2ep2.py |
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
|
🚀 🚀 🚀 🚀 |
This was referenced Oct 25, 2026
Open
5 tasks
5 tasks done
4 of 5 tasks
4 of 5 tasks
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.
With per-rank Engram tables and DP attention, every lookup all-gathers all DP ranks' hash ids, gathers the owned rows for all of them into a
[DP x tokens]bf16 buffer, and reduce-scatters it back. The traffic and the buffer grow with the DP size, so wide-EP decode pays a collective per Engram layer that is larger than the lookup itself.This adds an opt-in path,
SGLANG_OPT_DSV41_ENGRAM_PEER_SHARDS=1:engram_gather_peer: one Triton kernel reads each of a rank's own tokens' rows straight from the owning shard (owner found by binary search over the shard starts). No id gather, no global buffer, no collective; CUDA-graph safe. Covers the TP, DP and prefill-CP lookups.table_size / tp_sizeof HBM per GPU, so it suits wide DEP.cuda_vmm_utils.exchange_shareable_handles, shared with the DWDP transport; a group spanning hosts without FABRIC handles now fails there with a clear error. Peers are mapped with the existingimport_and_map_alloc.Off by default; nothing changes unless the variable is set.
Verification
test/manual/layers/test_engram_peer_shards.pyat the real table size, bitwise equal to the current lookup, eager and under CUDA graph replay: 8 GB300 ranks over two nodes (FABRIC), and 8 B300 GPUs on one host (POSIX fds).Related: #45679 (single-node TP4 peer reads).
CI States
Latest PR Test (Base): 🚫 Run #40045998118
Latest PR Test (Extra): ❌ Run #40045998125
Latest PR Test (AMD ROCm 10): 🚫 Run #40045998260