Skip to content

Llmd leader worker clean 2p2d enable#2094

Draft
shikamd123 wants to merge 2 commits into
llm-d:mainfrom
shikamd123:llmd_leader_worker_clean_2p2d_enable
Draft

Llmd leader worker clean 2p2d enable#2094
shikamd123 wants to merge 2 commits into
llm-d:mainfrom
shikamd123:llmd_leader_worker_clean_2p2d_enable

Conversation

@shikamd123

@shikamd123 shikamd123 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

feature

What this PR does / why we need it:

Enables AMD MoRI-IO WRITE-mode and Wide-EP disaggregation in the llm-d
sidecar, so a single DP world can be split across pods for prefill/decode
serving on ROCm (MI300X).

  • Turns on the MoRI-IO feature gate and adds the Wide-EP dispatch options
    (--moriio-write-mode, --moriio-parallel-dispatch, --moriio-dp-size,
    --moriio-dp-size-local, --moriio-remote-hosts, --moriio-decode-hosts).
  • Supports both serial WRITE (default: prefill → await → decode) and
    parallel WRITE (concurrent prefill/decode) dispatch.
  • Makes DP-rank routing router-authoritative: in serial mode the decode leg
    is pinned to the remote_dp_rank the prefill leg actually returned (falling
    back to a stable hash only if omitted); in parallel mode the rank is pinned up
    front with remote_dp_rank_override=true. Both legs agree without each side
    independently hashing the request id.
  • Adds DNS hostname resolution for the per-pod fan-out hosts (resolved to IPs
    at startup, LWS-friendly); raw IPs remain accepted for backward compatibility.
  • Documents the modes/flags/examples in MORIIO_README.md and adds option tests.

Companion to vLLM PR vllm-project/vllm#vllm-project/vllm#45043

Enable MoRI-IO WRITE-mode and Wide-EP features for production use:

1. Set MoRIIOFeatureEnabled = true to activate the feature gate
2. Add DNS hostname resolution for --moriio-remote-hosts and
   --moriio-decode-hosts flags (resolves DNS to IPs at startup)
3. Support BOTH raw IPs (static deployments) and DNS names (LWS)
4. Update MORIIO_README.md with enabled status and usage examples

Supported topologies:
- 1P1D (DP=EP=8, TP=1): Intra-node Wide-EP
- 2P2D (DP=EP=16, TP=1): Inter-node Wide-EP with LeaderWorkerSet

Host address options:
- Raw IPs: Pass through unchanged (e.g., 10.0.0.1) - for static deployments
- DNS names: Resolved to IPs at startup (e.g., pod.ns.svc) - for LWS

Signed-off-by: Shiksha Patel <shiksha.patel@amd.com>
@shikamd123
shikamd123 requested review from a team, roytman and shmuelk as code owners July 20, 2026 23:56
@shikamd123
shikamd123 requested review from liu-cong and vMaroon July 20, 2026 23:56
@github-actions github-actions Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. labels Jul 20, 2026
@shikamd123
shikamd123 marked this pull request as draft July 20, 2026 23:57
@github-actions github-actions Bot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/feature Categorizes issue or PR as related to a new feature. kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. kind/cleanup labels Jul 20, 2026
@shmuelk

shmuelk commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@shikamd123 Please remove the file PR_DESCRIPTION.md and add any missing text to the PR description.

In serial WRITE dispatch the prefill leg runs first and returns the DP
rank it actually ran on (remote_dp_rank in kv_transfer_params). Pin the
decode leg to that returned rank instead of independently re-hashing the
request id, so both legs agree without each side hashing.

This is the router-applies-the-connector-returned-rank model from the
vLLM PR #45043 review: the connector returns the rank, the router sets
the x-data-parallel-rank header on decode. Falls back to the blake2s
hash only when the prefill response omits remote_dp_rank (older vLLM
without the returnable rank).

Signed-off-by: Shiksha Patel <shiksha.patel@amd.com>
require.Empty(t, result)
})

t.Run("raw IPv4 addresses are passed through", func(t *testing.T) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the IP addresses, there should be DNS resolution, test it and update it.

opts.MoRIIODecodePodIP = "10.0.1.1"
opts.MoRIIODPSize = 16
opts.MoRIIODPSizeLocal = 8
opts.MoRIIORemoteHosts = []string{"10.0.0.1", "10.0.0.2"}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need IP addresses?

@shikamd123
shikamd123 force-pushed the llmd_leader_worker_clean_2p2d_enable branch from 1e1c0e6 to 1c0c816 Compare July 21, 2026 23:52
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Unsigned commits detected! Please sign your commits.

For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation.

@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants