Repository navigation
feat(te): pick transports at runtime in EFA builds, keep EFA NICs out of RDMA - #4355
Merged
whn09 merged 1 commit intoOct 12, 2026
Merged
Conversation
… of RDMA Step 2 of folding EFA support into the default wheels. - Topology::discover() gets an exclude_efa flag, and RDMA auto-discovery sets it. EFA NICs are verbs devices too, but only expose SRD, so the RDMA transport (RC QPs) cannot use them. Before this, the default wheel on an AWS EFA host picked RDMA on the EFA NICs and hung on "Failed to create QP"; it now finds no HCA and falls back as usual (TCP, or NVLink when configured). Hosts without EFA NICs are unaffected, and explicit EFA setups keep calling discover() without the flag. - In USE_EFA builds, only protocol=efa is set up by hand. Every other protocol goes through the same auto-discovery as non-EFA builds instead of always falling back to TCP, so the EFA wheel behaves like the default wheel on IB/RoCE hosts. This supersedes the rdma special case in kvcache-ai#4353. - The EFA transport requests FI_HMEM / FI_MR_HMEM only when a GPU device is present, and treats all memory as host memory otherwise. GPU builds on hosts without a visible GPU previously failed fi_getinfo with -FI_ENODATA. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 28, 2026
whn09
marked this pull request as ready for review
September 28, 2026 10:24
whn09
requested review from
ShangmingCai,
alogfans,
chestnut-Q,
doujiang24 and
staryxchen
as code owners
September 28, 2026 10:24
1 task
alogfans
reviewed
Sep 29, 2026
Comment on lines
+320
to
+321
| engine_ = std::make_unique<TransferEngine>(!use_efa && !use_flagcx, | ||
| device_filter); |
Collaborator
There was a problem hiding this comment.
@MC952-arch Does this change affect flagcx adaptor?
This was referenced Sep 29, 2026
Collaborator
Author
|
On flagcx: no change. In EFA builds, protocol=flagcx still constructs the engine with auto_discover=false and installs the flagcx transport by hand, as before. Only the fallback for other protocols changed (auto-discovery instead of TCP). Non-EFA builds, where the flagcx adaptor is normally used, are untouched. @alogfans @ShangmingCai @stmatengss could you take a look when you have time? It has no conflicts with current main. |
This was referenced Oct 12, 2026
8 of 36 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Step 2 of folding AWS EFA support into the default wheels (step 1 is #4354). This removes the behavioral
#ifdef USE_EFAin transport selection and makes GPU handling in the EFA transport a runtime decision.Topology::discover()gets anexclude_efaflag (driverefain sysfs), andTransferEngineImpl's auto-discovery sets it.Failed to create QP. It now finds no HCA and takes the normal fallback: TCP, or NVLink when configured.discover()without the flag.protocol=efais set up by hand. Every other protocol goes through auto-discovery instead of always installing TCP, so the EFA wheel behaves like the default wheel on IB/RoCE. This supersedes fix(efa): honor protocol=rdma in EFA builds #4353.FI_HMEMonly with a GPU.FI_HMEM/FI_MR_HMEMare requested only when a CUDA/HIP device is present. Otherwise the transport usesFI_HMEM=system, as CPU builds already do, and loopback treats memory as host memory. GPU builds on hosts without a visible GPU used to failfi_getinfowith-FI_ENODATA.Behavior notes:
protocol=tcpnow get the same transport as the default wheel, which ignores the protocol for auto-discovery. UseMC_FORCE_TCPto force TCP.get_local_topology()reports the RDMA auto-discovery topology, so it no longer lists EFA NICs. Neither SGLang nor vLLM calls it.Related: vllm-project/vllm#55635, sgl-project/sglang#40995.
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Two wheels were built from this branch: EFA-cuda13 and the default cuda13. They were tested on 2x p5en.48xlarge (16 EFA NICs, H200) inside
lmsysorg/sglang:latestwith the AWS EFA userspace under/opt/amazon. IB/RoCE was emulated with Soft-RoCE on the system rdma-core.Test commands:
Test results:
rdma, AWS with only EFA NICsrdma, rxe0 + 16 EFA NICsrdma, devicerxe0rdma, rxe0 + 16 EFA NICsefa, no visible GPU (DRAM)fi_getinfo failed: No data availableon all NICsefa, GPU memoryChecklist
./scripts/code_format.sh. I used the same tool it runs: clang-format 20 with the repo.clang-format.AI Assistance Disclosure
Claude Code (Claude Opus 5.5) helped draft the code, run the validation on the p5en instances, and write this description. I reviewed the changes and the test results.