Skip to content

[Perf] NIXL: prepared dlists for hybrid-model state transfer - #44740

Merged
ishandhanani merged 3 commits into
sgl-project:mainfrom
iyastreb:iyastreb/prep-make-extra-data
Oct 18, 2026
Merged

ishandhanani merged 3 commits into
sgl-project:mainfrom
iyastreb:iyastreb/prep-make-extra-data

Conversation

@iyastreb

@iyastreb iyastreb commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Hybrid-model state (Mamba/GDN, SWA, DSA indexer, QSA, MiniMax, MXFP8 block scales) was
sent with a fresh initialize_xfer per request, rebuilding and re-validating every
descriptor. With NIXL_UCX_SGL_ENABLE=1 the data path is one SGL put per transfer, so
this host-side descriptor work is what remains on the transfer worker.

Modifications

  • At peer registration, build one strided source/destination dlist pair per decode peer
    covering all whole-slot state components; per request, one make_prepped_xfer with
    int32 selectors instead of one initialize_xfer per component.
  • Decode advertises its state pool lengths (new registration frame 23) so prefill can
    size the destination dlist. An older decode without the frame stays on the generic path.
  • Components the fast path cannot address (TP-sliced layouts, PP/CP/DCP, unpaired
    entries) stay generic per component. A stride mismatch is recorded at registration and
    fails every transfer to that peer with the reason, instead of addressing the decode
    with the prefill stride or killing the bootstrap thread.
  • State completion is one standalone {room}_state_{rank} notification sent after every
    handle of the chunk settles (NIXL UCX flushes the endpoint before DONE). This replaces
    per-component attached notifs, which let decode treat the first component's arrival
    as state complete.

Accuracy Tests

Not applicable: the same bytes move through prepared descriptors. Byte-for-byte
equivalence of the prepared and generic paths was checked with a memcpy fake agent
across Mamba, SWA on MHA, DSA with elided layers, QSA with layer ids, MLA peers with
mismatched TP, a decode with an extra DSA entry, and multi-component requests.

Speed Tests and Profiling

DSv4-Flash, GB200, ISL=1k, cost of state preparation:

Concurrency TTFT mean of run medians, ms Change Preparation mean per request/rank, µs Change Preparation mean max rank, µs Change
16 422.72 → 422.97 +0.06% 423.39 → 41.76 -90.14% 436.22 → 46.85 -89.26%
32 646.65 → 677.24 +4.73% 421.35 → 40.42 -90.41% 437.20 → 43.89 -89.96%
64 826.67 → 750.43 -9.22% 415.64 → 39.66 -90.46% 433.19 → 43.15 -90.04%
128 995.54 → 996.30 +0.08% 418.31 → 39.24 -90.62% 432.06 → 42.73 -90.11%
256 1160.65 → 1081.54 -6.82% 419.67 → 39.90 -90.49% 430.58 → 44.15 -89.75%

Checklist

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ⏳ Run #39107243439
Latest PR Test (Extra): ❌ Run #39107243403
Latest PR Test (AMD ROCm 10): ⏳ Run #39107243431

@iyastreb iyastreb changed the title [PD] NIXL: prepared dlists for hybrid-model state transfer [Perf] NIXL: prepared dlists for hybrid-model state transfer Oct 16, 2026
@ishandhanani

Copy link
Copy Markdown
Collaborator

/rerun-group disaggregation

@ishandhanani

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🚀 4-gpu-gb300 (1 test): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_aarch64.py

🚀 2-gpu-h100 (6 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_basic.py
cd test/ && python3 registered/disaggregation/test_disaggregation_chunked_prefill_abort.py
cd test/ && python3 registered/disaggregation/test_disaggregation_decode_offload.py
cd test/ && python3 registered/disaggregation/test_disaggregation_optimistic_prefill.py
cd test/ && python3 registered/disaggregation/test_disaggregation_rust_server.py
cd test/ && python3 registered/disaggregation/test_disaggregation_unified_memory.py

🚀 8-gpu-h20 (5 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_decode_radix_cache.py
cd test/ && python3 registered/disaggregation/test_disaggregation_different_tp.py
cd test/ && python3 registered/disaggregation/test_disaggregation_dp_attention.py
cd test/ && python3 registered/disaggregation/test_disaggregation_nixl.py
cd test/ && python3 registered/disaggregation/test_disaggregation_pp.py

🚀 8-gpu-h200 (4 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_decode_radix_cache_swa.py
cd test/ && python3 registered/disaggregation/test_disaggregation_dsv4.py
cd test/ && python3 registered/disaggregation/test_disaggregation_hisparse.py
cd test/ && python3 registered/disaggregation/test_disaggregation_hybrid_attention.py

🚀 4-gpu-b200 (2 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_dwdp_gpt_oss.py
cd test/ && python3 registered/disaggregation/test_disaggregation_inkling_mxfp8.py

🚀 4-gpu-h100 (2 tests): ✅ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_kimi_linear.py
cd test/ && python3 registered/disaggregation/test_epd_disaggregation.py

⛔ registered/disaggregation/test_disaggregation_xpu.py: test/registered/disaggregation/test_disaggregation_xpu.py is registered for XPU (suite stage-b-test-1-gpu-xpu), not for CUDA or CPU; rerun-test.yml has no XPU job. Rerun it with /rerun-failed-ci, or dispatch the XPU workflow manually.

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Oct 18, 2026
@ishandhanani
ishandhanani merged commit 6c3db0f into sgl-project:main Oct 18, 2026
233 of 273 checks passed
ShangmingCai added a commit to aurickq/sglang that referenced this pull request Oct 20, 2026
NIXL registration: main (sgl-project#44740) uses frame 23 for packed_state_data_lens, so
the aux item lens move to frame 24.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@iyastreb
iyastreb deleted the iyastreb/prep-make-extra-data branch October 26, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants