Skip to content

[EP] Decouple PG builds and add TCPStore bootstrap - #5312

Merged
UNIDY2002 merged 2 commits into
kvcache-ai:mainfrom
niwehao:elastic-ep-pg-tcpstore
Nov 8, 2026
Merged

UNIDY2002 merged 2 commits into
kvcache-ai:mainfrom
niwehao:elastic-ep-pg-tcpstore

Conversation

@niwehao

@niwehao niwehao commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #4853. Together, these changes lay the groundwork for future runtime scaling of ElasticBuffer.

Decouple Mooncake EP and Mooncake PG builds and add TCPStore bootstrap to the DeepEP-style ElasticBuffer.

  • Add WITH_PG, with EP + PG, EP-only, PG-only, and neither build combinations. Existing non-XPU WITH_EP=ON builds continue to enable PG by default.
  • Share TCPStore metadata exchange between the existing Buffer.create_elastic() path and ElasticBuffer.create_elastic().
  • Keep the existing ProcessGroup constructor and communication runtime. The new ElasticBuffer entry point uses a fixed rank set; runtime grow/shrink is out of scope.

Suggested Merge Priority

  • P2 — Normal

Module

  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • Python Wheel (mooncake-wheel)

Type of Change

  • New feature
  • Refactor

How Has This Been Tested?

  • Local CPU tests: 66 passed, 6 skipped. Tests are maintained separately from this PR.
  • Latest wheel staging checks: 9 CPU tests passed using isolated shell fragments and simulated wheel artifacts, including all four EP/PG combinations.
  • CUDA build configuration: all four WITH_EP / WITH_PG combinations passed; WITH_EP=ON defaults WITH_PG=ON.
  • CUDA 13 EP + PG build and Python component install passed. The generated install rules select only the enabled device libraries.
  • Two H20 nodes, 2 GPUs per node: TCPStore and PG bootstrap paths passed dispatch/combine and fixed-membership refresh checks, with NVLink IPC within a node and IBGDA across nodes. The TCPStore path also passed CUDA Graph capture and replay.
  • Three H20 GPUs: the existing Buffer.create_elastic() connect, disconnect/reconnect, mask, and dispatch/combine checks passed.

The GPU runtime tests, CUDA build, and component install were run before the latest wheel-staging simplification. Full wheel packaging, NCCL Device, XPU, and SGLang model end-to-end tests remain to be run.

  • Unit tests pass
  • Integration tests pass
  • Manual testing done

Checklist

  • Every commit includes a Signed-off-by trailer certifying the DCO
  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh (no C/C++ files changed)
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation (if applicable; not applicable for this PR)
  • I have added tests to prove my changes are effective (maintained separately; not included in this PR)
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • AI tools were used: Codex assisted with implementation, testing, and the PR description.

@github-actions github-actions Bot added size/M 100-1000 changed lines (additions + deletions) run-ci Mooncake EP CI/Build Integration labels Nov 6, 2026
Signed-off-by: Parachute <125028662+niwehao@users.noreply.github.com>
Signed-off-by: Parachute <125028662+niwehao@users.noreply.github.com>
@niwehao
niwehao force-pushed the elastic-ep-pg-tcpstore branch from 4580b44 to cda4174 Compare November 7, 2026 04:14
@niwehao
niwehao marked this pull request as ready for review November 7, 2026 04:19
Copilot AI balanced review requested due to automatic review settings November 7, 2026 04:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@UNIDY2002 UNIDY2002 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@UNIDY2002
UNIDY2002 merged commit b35e782 into kvcache-ai:main Nov 8, 2026
40 checks passed
jfeng18 added a commit to jfeng18/Mooncake that referenced this pull request Nov 9, 2026
* upstream/main: (28 commits)
  [Store] Remove unreachable dead code in reserved OpLog paths (kvcache-ai#5043)
  [Store][BUGFIX]: Avoid repeated NoF cleanup for unregistered buffers (kvcache-ai#5301)
  [Store] Fence the local disk tier on the first unrecoverable disk error (kvcache-ai#4490)
  [Store] Add opt-in aligned O_DIRECT bucket writes (kvcache-ai#4820)
  [Store] posix support Read DFS replicas straight into host buffers (kvcache-ai#5201)
  [TENT] Pipeline RDMA slice preparation with worker posting (kvcache-ai#5277)
  [TE] HipTransport: submit copies asynchronously, one stream and event per device (kvcache-ai#4953)
  [Misc] Add staryxchen as a HIP transport code owner (kvcache-ai#5351)
  [Doc] nvlink_intra works over PCIe P2P, not only NVLink (kvcache-ai#5266)
  [Bugfix][TENT] Propagate io_uring staging copy failures (kvcache-ai#5335)
  [Bugfix][TENT] Make UB batch submission all-or-nothing (kvcache-ai#5274)
  Add store rs tone tests (kvcache-ai#5282)
  [EP] Validate XPU Buffer constructor arguments (kvcache-ai#5329)
  [EP] Decouple PG builds and add TCPStore bootstrap (kvcache-ai#5312)
  [Bugfix][PG] Serialize RPC socket operations and drain shutdown (kvcache-ai#5098)
  [EP] Enable the native XPU EP over RDMA (kvcache-ai#5207)
  [Store] Use the AWS default credential chain when S3 static keys are unset (kvcache-ai#5303)
  [Bugfix][Store] Register dummy query RPC handlers in mooncake_client (kvcache-ai#5200)
  [Store] Preserve variadic RPC compatible fields with NDEBUG (kvcache-ai#5269)
  [TransferEngine] Avoid false CQ timeout diagnostics after idle periods (kvcache-ai#5281)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/Build Integration Mooncake EP run-ci size/M 100-1000 changed lines (additions + deletions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants