[PD][MoRI] Drive KV transfers with a sharded synchronous worker pool - #26922
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the documentation index page to feature a new blog post on AMD Instinct MI355X and MoRI, and refactors the MoRI KV transfer mechanism in conn.py to utilize multi-threaded asynchronous queue-based chunk transfers. A critical issue was identified in the _wait_chunk method, where tripping the SLA timeout fails to break the infinite loop, which could cause the worker thread to hang indefinitely if the transfer remains in progress. A code suggestion has been provided to return immediately when the SLA is tripped.
9bdc7c4 to
e193edb
Compare
e193edb to
1ea2a3a
Compare
|
/tag-and-rerun-ci |
|
The failing |
|
@amd-bot ci-status |
CI Status for PR #26922PR: [PD][MoRI] Drive KV transfers with a sharded synchronous worker pool AMD: 4 failures (1 likely related) | Others: 5 failures (0 related) AMD CI Failures
Other CI Failures
Details🔴 stage-b-test-large-8-gpu-mi35x-disaggregation-amd — this is a real, PR-caused regression and must be fixed before merge.
All other failures are infrastructure or unrelated test issues:
Generated by amd-bot using Claude Code CLI |
For the MLA backend the contiguous transfer plan was built once outside the per-layer loop using kv_item_lens[0], which is incorrect when layers have differing item lengths. Build the plan inside the loop using each layer's kv_item_lens[layer_id]. Also bump MORI_COMMIT in docker/rocm.Dockerfile to d87651c.
|
@yctseng0211 @bingxche Would you please help to check the PR image used here? |
|
@amd-bot ci-status |
CI Status for PR #26922Merge verdict: ❌ Do not merge. This PR has a real, self-inflicted bug: the AMD MoRI disaggregation e2e test ( Note The PR's core changed code path ( Changed files: AMD: 3 failures (1 related) · Others: 4 failures (0 related) · (cascade/aggregator jobs AMD CI Failures
Other CI Failures
Details / what to do before merge
Generated by amd-bot using Claude Code CLI |
|
@bingxche @yctseng0211 left review comment above - this PR changed MoRI version, according to @Duyi-Wang if we use image with the change included, the CI failure in |
…GB AINIC reg limit on older firmware)
Hi @HaiShaw Test passed with new MORI commit. cc @yctseng0211 |

Summary
Refactor the MoRI PD KV-transfer path to a bounded, per-room–sharded pool of synchronous workers:
send()only enqueues; workers dobatch_write → wait_all → notify. This moves both submission and completion off the prefill scheduler thread and bounds in-flight transfers.Motivation
The old path ran KV submission and status busy-polling on the prefill scheduler thread, so scheduler load slowed transfers, and there was no bound on in-flight requests (RDMA SQ overflow under bursts).
Design
bootstrap_room(preserves per-request chunk order).poll()becomes O(1).Testing
Same-machine A/B vs
main— DeepSeek-R1 671B FP8, TP8, 2-node PD (1P+1D), mori,--disable-radix-cache.Single-request latency (output=16), refactor / main:
→ within run-to-run noise; no regression.
main(2048/2048, ~23.8K input tok/s). Tail timeouts are single-prefill-node capacity (identical onmain), not the transfer path.cc @Duyi-Wang
CI States
Latest PR Test (Base): ❌ Run #27112499352
Latest PR Test (Extra): ❌ Run #27112499288