[AMD] Document Mori XGMI for Single-Node PD Disaggregation - #25094
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Mori transfer engine in PD disaggregation, specifically adding a same-node XGMI IO backend. The changes include updated documentation, new server arguments with associated validation, and a manual end-to-end test for XGMI transfers. A critical syntax error was identified in the CLI argument parsing logic where a redundant function call was introduced.
|
/tag-and-rerun-ci |
|
Add @maning00 to the review |
|
A mori-io fix proposed in ROCm/mori#316, which should work using |
|
Thanks for the feedback. I’ve updated the PR to remove the Mori XGMI server argument and related docs changes. SGLang now exposes this as |
|
The PR is still blocked on CODEOWNERS approval. Please take a look when you get a chance @wisclmy0611 @zijiexia |
|
Hi @clintg6 , we've migrated our documentations to |
|
@zijiexia Thanks for the heads up. The current docs/ diff was unrelated to this PR and came from syncing with upstream main. I’ve cleaned that out after rebasing. If you’d like, I can document SGLANG_MORI_USE_XGMI under docs_new/. |
Thanks for cleaning that up! Yes, please go ahead and document SGLANG_MORI_USE_XGMI, that would be very helpful! |
|
@zijiexia docs_new has been updated to document |
|
@amd-bot ci-status |
CI Status for PR #25094Merge verdict: No failure is caused by this PR — every red job is either an NVIDIA infra GPU-dirty cascade or a pre-existing NPU diffusion-latency miss. But do not read green as "verified": the actual new feature (the Mori XGMI branch) is never exercised by CI — it sits behind a default-off env var and its only test lives in Caution The PR's core change — the Changed files: AMD: 0 completed failures (still running — 13 in-progress, 2 queued) · Others: 23 failures (0 related) AMD CINo AMD failures. The most relevant suite — Other CI Failures
Details / what to do before merge
Generated by amd-bot using Claude Code CLI |
kkHuang-amd
left a comment
There was a problem hiding this comment.
LGTM, but I have one question. What mori version is depend by this environ variable "MORI_DISABLE_AUTO_XGMI"?
Has the current sglang image included this mori version?
Or we need to upgrade mori version?
|
Could you modify your command in the Usage section? It does not set "SGLANG_MORI_USE_XGMI" in launch command. |
|
@kkHuang-amd Good catch the Usage section was carried over from the initial version of this PR, before XGMI was refactored to be env-var-driven. XGMI is now controlled only by The MoRI build dependency is already handled #26922 (merged into main) bumped |
|
Since MORI already provides equivalent environment variables for this behavior, I don't think we need to introduce duplicated SGLang-level env vars for the same control. That would add another layer of configuration without much benefit. I think the documentation update is useful. We can document the existing MORI environment variables and explain how users should set them when running SGLang. |
|
@kkHuang-amd @Duyi-Wang I rebased this PR on top of |
…ct#25094) Co-authored-by: clintg6 <7388379+clintg6@users.noreply.github.com>
Document Mori XGMI for Single-Node PD Disaggregation
Summary
This PR has been rebased on top of
mainand minimized to documentation only.It documents Mori's native environment variable for enabling same-node XGMI fallback:
No new SGLang-specific environment variable is introduced. In particular, this PR no longer adds or documents
SGLANG_MORI_USE_XGMI.Mori PDD still initializes the Mori IO backend through the existing RDMA backend path. When
MORI_DISABLE_AUTO_XGMI=0is set and no active RDMA device is available, Mori can internally fall back to its XGMI path for same-node GPU-to-GPU KV cache transfer, as supported by ROCm/mori#316.Motivation
Single-node prefill/decode disaggregation can run with prefill and decode GPUs connected locally through XGMI/Infinity Fabric. In that deployment, requiring users to discover Mori's XGMI fallback environment variable from outside the SGLang docs is confusing.
Since Mori already owns the fallback behavior, this PR documents the Mori-native control directly instead of adding a duplicate SGLang wrapper env var.
Changes
Documentation
MORI_DISABLE_AUTO_XGMItodocs_new/docs/references/environment_variables.mdx.MORI_DISABLE_AUTO_XGMI=0allows Mori to automatically use XGMI for same-node PDD when no active RDMA device is available.Removed From Earlier Revision
The earlier revision of this PR added a SGLang-specific env var and implementation hooks. Those changes have been removed.
This PR no longer changes:
python/sglang/srt/environ.pypython/sglang/srt/disaggregation/mori/conn.pytest/manual/test_mori_transfer_engine_e2e.pyBehavior
MORI_DISABLE_AUTO_XGMIunsetMORI_DISABLE_AUTO_XGMI=0SGLang does not create a separate XGMI backend and does not translate a SGLang-specific flag. Users configure Mori directly with the Mori env var.
Usage
Single-node Mori PDD with XGMI fallback enabled:
In the common single-host launch case, no extra Mori node ID setting is needed. Mori uses the host identity in its engine descriptors to decide whether peers are on the same node. If prefill and decode run in separate containers on the same host and those containers report different hostnames, set the same
MORI_IO_NODE_IDin both containers so Mori still classifies the engines as same-node.How It Works
Mori PDD transfers GPU KV cache through
MoriKVManager.send_kvcache(), which ultimately calls Mori IObatch_write(). The transfer calls are transport-agnostic; the selected Mori IO backend determines whether the copy uses RDMA or XGMI.With XGMI fallback enabled:
Auxiliary CPU metadata remains on the existing SGLang ZMQ/TCP path and does not require Mori IO.