Skip to content

[CI/Build][Doc] Ship EFA in the default wheels only - #5322

Merged
whn09 merged 2 commits into
kvcache-ai:mainfrom
whn09:docs/efa-default-wheel
Nov 13, 2026
Merged

whn09 merged 2 commits into
kvcache-ai:mainfrom
whn09:docs/efa-default-wheel

Conversation

@whn09

@whn09 whn09 commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Since 0.3.14, the default wheels (mooncake-transfer-engine, -cuda13, -non-cuda) are built with the EFA transport on both x86_64 and arm64. _build-wheel.yaml passes -DUSE_EFA=ON for every variant and checks engine.SUPPORT_EFA. The separate mooncake-transfer-engine-efa* packages are no longer needed. Their release workflows failed on v0.3.14, so they stop at 0.3.13.post1, and they never shipped arm64. As discussed in #5260, this PR drops them and points the docs at the default wheels.

CI/CD

  • Remove release-efa.yaml, release-efa-cuda13.yaml, release-efa-non-cuda.yaml, _build-efa-wheel.yaml, ci_efa.yml, and the EFA_BUILD / EFA_CU13_BUILD / EFA_NON_CUDA_BUILD variants of scripts/build_wheel.sh.
  • Keep the guard [TE] fix(efa): number the topology over the opened EFA devices only #5184 added, and extend it. A new efa-unit-tests job in ci.yml replaces build-wheel-efa. It runs on ubuntu-22.04, the environment ci_efa.yml used, and configures with USE_EFA=ON USE_CUDA=ON BUILD_UNIT_TESTS=ON against the same pinned libfabric 1.18.3 headers as the wheel build. It builds every efa_*test target, so a test that only compiles with USE_EFA=ON, like the one behind [Bug]: v0.3.14 EFA wheels not published — EFA release builds fail on missing mooncake_te_build_config.h #5260, fails in PR CI rather than at the release tag. It then runs the five that need no EFA hardware: efa_endpoint_handshake_test, efa_select_device_test, efa_discovery_test, efa_stale_segment_desc_test and efa_remote_accessible_test. The CI gate is updated to the new job name.
  • Building the unit tests inside the manylinux wheel builder was tried first and doesn't work there. It has no libpython for on_cuda_transport_guard_test, and its gtest doesn't link default_config_test. Hence the separate Ubuntu job.

Docs

  • efa_transport.md, quick-start.md: install the default wheel for EFA, verify with engine.SUPPORT_EFA, and note that the EFA packages stop at 0.3.13.post1. Select EFA per framework: MOONCAKE_PROTOCOL=efa in SGLang, "mooncake_protocol":"efa" in vLLM's kv_connector_extra_config. The README drops the EFA PyPI badge, which pointed at the stale package.
  • Fix a few statements in efa_transport.md that measurements contradict:
    • p6-b300 CPU-to-CPU (~282 GB/s) was attributed to DRAM controller saturation. It is the host's inbound PCIe-write limit, about 143 GB/s per socket: cudaMemcpy D2H on all 8 GPUs hits the same ~287 GB/s while H2D reaches ~441 GB/s, and bidirectional writes total ~393 GB/s.
    • p6-b200 replaces pre-[TE] EFA SRD shared-endpoint refactor: drop per-peer fid_ep model #1944 numbers marked as a lower bound with a 2026-10-28 main run: GPU write 337.0 / read 335.7, CPU 224.6 / 224.1 GB/s. It also explains the CPU cap: each PCIe switch puts 2 NICs behind one Gen5 x16 uplink. 2 NICs on one switch give 56.9 GB/s and on two switches 94.7 GB/s, so the 8 NICs top out at 4 × ~56. The p5en note and the CPU tuning tip are corrected to match.
    • "libfabric not found" troubleshooting showed the link-time cannot find -lfabric, which can no longer happen because libfabric is dlopen'ed. It now shows the runtime message.
    • The Neuron section pointed at mooncake-transfer-engine-efa-non-cuda; it now points at mooncake-transfer-engine-non-cuda.
    • Trim obsolete history: the fixed 256 WR cap asides and the SGLang pre-#25083 patch walkthrough.

Overlaps: #4607 and #3970 also edit the deleted EFA workflows, so whichever lands second needs a rebase.

Not covered: vLLM's docker/Dockerfile.efa installs mooncake-transfer-engine-efa-cuda13. It should switch to mooncake-transfer-engine-cuda13, which is a change on the vLLM side.

Refs #5260

Suggested Merge Priority

  • P0 — Urgent: Critical security vulnerability, data loss/corruption, or widespread production outage requiring immediate action
  • P1 — High: Significant correctness or stability issue in existing functionality, or a regression blocking users without a practical workaround
  • P2 — Normal: Routine bug fix, validated performance/compatibility improvement, or new feature for a confirmed use case
  • P3 — Low: Experimental feature, optional enhancement, refactoring, or cleanup with no urgent user impact

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Mooncake Conductor (mooncake-conductor)
  • Reshard (mooncake-reshard)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Test commands:

cd docs && make clean && make html
uv run --no-project --with pyyaml --with pytest python -m pytest -q mooncake-wheel/tests/test_release_wheel_tags.py
bash -n scripts/build_wheel.sh
pre-commit run --files <changed files>

Test results:

  • Unit tests pass
  • Integration tests pass (if applicable)
  • Manual testing done (describe below)

make html succeeds with no warnings on the changed pages. test_release_wheel_tags.py passes 16/16, and the edited workflows parse as YAML. In this PR's CI, efa-unit-tests builds all 11 EFA test targets and passes 5/5 of the no-hardware tests. The benchmark numbers in the docs come from the measurements cited above, made on p6-b200 and p6-b300 pairs between 2026-10-28 and 10-29.

Checklist

  • Every commit I contribute includes my 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
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

Claude Code drafted the changes and ran the measurements cited in the docs; the submitter reviewed every changed line.

🤖 Generated with Claude Code

@Aionw Aionw 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.

LGTM

# CPU/DRAM-only transfers — built with USE_CUDA=OFF
pip install mooncake-transfer-engine-efa-non-cuda
```
Select the transport with `protocol=efa` (`MOONCAKE_PROTOCOL=efa` in vLLM and SGLang). With `rdma`, EFA NICs are skipped and IB/RoCE NICs are used when present.

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.

[P2] Use vLLM’s connector configuration to select EFA

MOONCAKE_PROTOCOL=efa works for SGLang, but vLLM’s MooncakeConnector reads kv_transfer_config.kv_connector_extra_config.get("mooncake_protocol", "rdma") and does not read this environment variable (upstream implementation). Following this instruction with vLLM therefore leaves the protocol as rdma; on an EFA-only host, the EFA NICs are skipped rather than used by the EFA transport.

Could we distinguish the two frameworks here: keep MOONCAKE_PROTOCOL=efa for SGLang, and instruct vLLM users to set "kv_connector_extra_config":{"mooncake_protocol":"efa"} in --kv-transfer-config, as the vLLM examples further down already do? The same correction is needed in docs/source/getting_started/quick-start.md:248–249.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, thanks. Fixed in f4b7088: both places now say MOONCAKE_PROTOCOL=efa for SGLang and "mooncake_protocol":"efa" in kv_connector_extra_config for vLLM, linking to the vLLM usage section. The MOONCAKE_PROTOCOL row in the environment-variable table also no longer claims vLLM reads it. I also squashed the branch into one commit and rebased it onto current main.

@whn09
whn09 force-pushed the docs/efa-default-wheel branch from 96df3ba to f4b7088 Compare November 9, 2026 04:17

@ykwd ykwd 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.

Thanks for the update

@zxpdemonio zxpdemonio 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.

LGTM at f4b7088. I reviewed the workflow removals, the replacement EFA test job, the default-wheel EFA configuration, and the documentation changes. I independently ran the wheel workflow tests (16 passed), bash syntax validation, and git diff --check. I did not rebuild the native wheels or rerun hardware benchmarks.

Two non-blocking suggestions:

  1. Consider retaining non-CUDA PR build coverage through _build-wheel.yaml. The removed ci_efa.yml covered non-CUDA wheels on both x86_64 and arm64; the replacement EFA unit-test job uses CUDA ON on x86_64. Non-CUDA release/nightly builds remain, but those configurations lose PR-time coverage.
  2. Consider adding --no-tests=error to the filtered ctest invocation so a future test rename or registration change cannot silently produce a successful zero-test run. The five current test names match their CMake registrations.

The vLLM protocol-selection documentation has been corrected. Please resolve the current merge conflicts and rerun CI on the updated branch before merging.

whn09 and others added 2 commits November 12, 2026 15:34
The default wheels (mooncake-transfer-engine, -cuda13, -non-cuda) are
built with the EFA transport since 0.3.14, on x86_64 and arm64. The
separate mooncake-transfer-engine-efa* packages are no longer needed:
their release workflows failed on v0.3.14, so they stop at 0.3.13.post1
(kvcache-ai#5260).

- Remove release-efa{,-cuda13,-non-cuda}.yaml, _build-efa-wheel.yaml,
  ci_efa.yml and the EFA_* package variants of build_wheel.sh.
- Keep the guard kvcache-ai#5184 added: a new efa-unit-tests CI job on
  ubuntu-22.04 configures with USE_EFA, USE_CUDA and BUILD_UNIT_TESTS
  against the pinned libfabric 1.18.3 headers, builds every efa_*test
  target, and runs the five that need no EFA hardware.
- Docs: install the default wheel for EFA, drop the EFA-package
  instructions and badge, select EFA per framework (MOONCAKE_PROTOCOL
  in SGLang, mooncake_protocol in vLLM's kv_connector_extra_config), and
  fix the CPU-to-CPU explanations (the host PCIe path bounds them, not
  DRAM), the stale p6-b200 numbers, and the link-time libfabric
  troubleshooting entry (libfabric is dlopen'ed).

Refs kvcache-ai#5260

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: whn09 <wanghenan09@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: whn09 <wanghenan09@gmail.com>
@whn09
whn09 force-pushed the docs/efa-default-wheel branch from f4b7088 to fc949ca Compare November 12, 2026 07:37
@whn09

whn09 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. I rebased onto current main and resolved the conflicts. Both were in the wheel-variant lists: main added the XPU variant (#5078), so BUILD_VARIANTS in scripts/build_wheel.sh and the variant comment in mooncake-wheel/pyproject.toml now include xpu and still drop the three EFA variants.

  1. --no-tests=error: applied in a separate commit, so the EFA unit-test step now fails if the filter matches no tests.
  2. Non-CUDA PR-time coverage: I'd rather leave this out of this PR, since it means changing the shared _build-wheel.yaml matrix. Release and nightly still build the non-CUDA wheels on x86_64 and arm64. I can follow up with a separate PR if the maintainers want a non-CUDA build in PR CI.

Locally, test_release_wheel_tags.py passes (16 tests), and pre-commit passes on the touched files.

@whn09
whn09 merged commit b2ff9e9 into kvcache-ai:main Nov 13, 2026
33 checks passed
banxingmjj pushed a commit to openanolis/Mooncake that referenced this pull request Nov 13, 2026
* [CI/Build][Doc] Ship EFA in the default wheels only

The default wheels (mooncake-transfer-engine, -cuda13, -non-cuda) are
built with the EFA transport since 0.3.14, on x86_64 and arm64. The
separate mooncake-transfer-engine-efa* packages are no longer needed:
their release workflows failed on v0.3.14, so they stop at 0.3.13.post1
(kvcache-ai#5260).

- Remove release-efa{,-cuda13,-non-cuda}.yaml, _build-efa-wheel.yaml,
  ci_efa.yml and the EFA_* package variants of build_wheel.sh.
- Keep the guard kvcache-ai#5184 added: a new efa-unit-tests CI job on
  ubuntu-22.04 configures with USE_EFA, USE_CUDA and BUILD_UNIT_TESTS
  against the pinned libfabric 1.18.3 headers, builds every efa_*test
  target, and runs the five that need no EFA hardware.
- Docs: install the default wheel for EFA, drop the EFA-package
  instructions and badge, select EFA per framework (MOONCAKE_PROTOCOL
  in SGLang, mooncake_protocol in vLLM's kv_connector_extra_config), and
  fix the CPU-to-CPU explanations (the host PCIe path bounds them, not
  DRAM), the stale p6-b200 numbers, and the link-time libfabric
  troubleshooting entry (libfabric is dlopen'ed).

Refs kvcache-ai#5260

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: whn09 <wanghenan09@gmail.com>

* [CI/Build] Fail the EFA unit-test step if the filter matches no tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: whn09 <wanghenan09@gmail.com>

---------

Signed-off-by: whn09 <wanghenan09@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
jfeng18 added a commit to jfeng18/Mooncake that referenced this pull request Nov 14, 2026
* upstream/main: (95 commits)
  [Bugfix][TENT] Honor EFA protocol in classic shim (kvcache-ai#5280)
  [Doc] Add the AMD ATOM integration and homepage blog posts (kvcache-ai#5380)
  [Store-RS] Fence Store-RS eviction and delete by allocation identity (kvcache-ai#5243)
  fix: preserve integer map keys in structured non-tensor reads (kvcache-ai#4603)
  [Bugfix][TE][Store] Fix CXI transport so Mooncake Store works over Slingshot (kvcache-ai#5454)
  [Store] Coalesce removal KV events before publishing (kvcache-ai#5467)
  [CI/Build][Doc] Ship EFA in the default wheels only (kvcache-ai#5322)
  [CI/Build][Doc] Ship EFA in the default wheels only (kvcache-ai#5322)
  [Store] Shard LeaseEvictionIndex and parallelize memory eviction (kvcache-ai#5448)
  [TransferEngine] Open intra-node NVLink IPC mappings on the source buffer's device (kvcache-ai#5443)
  [Bugfix][TENT] Temporarily disable smart scheduling by default (kvcache-ai#5445)
  [TENT] Add a blocking waitTransfer entry point (kvcache-ai#5415)
  [EP] Add planned runtime scaling to ElasticBuffer (kvcache-ai#5376)
  [Store] Persist object upload and cleanup recovery records (kvcache-ai#5310)
  [TransferEngine] Add opt-in high-priority HIP copy streams (kvcache-ai#5005)
  [Store] feat: break master key count and value bytes down by configurable key groups (kvcache-ai#5393)
  [Store] Populate HugeTLB EFA segments in parallel (kvcache-ai#5457)
  [CI/Build] Prevent OOM in PR unit-tests build on GitHub-hosted runners (kvcache-ai#5420)
  [Store] Add automatic pipelined gather to ranged reads (kvcache-ai#4502)
  [Store] Add property tests for structured member byte-range plans (kvcache-ai#5328)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/Build documentation Improvements or additions to documentation Installation Integration run-ci size/M 100-1000 changed lines (additions + deletions) Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants