[Store] Fix EFA transport auto-discovery - #3207
Conversation
|
The failing checks seem to be an issue with timing/connection in the tests, according to the github agent. |
|
Thanks for the fix — root cause is correct and matches #2070. I validated it on a Reproduced.
No regressions: efa auto-discover (3× soak), efa + manual devices, Ordering is safe on both sides: with Please rebase — merge conflictThe PR is Non-blocking comments
Approving the fix. Rebase for the conflict, and comment 1 would be good to fold in. |
Aionw
left a comment
There was a problem hiding this comment.
Could we pass the auto-discovery configuration into setAutoDiscover() and let the Transfer Engine derive the appropriate behavior?
Client::InitTransferEngine() already has the relevant configuration, including auto_discover, protocol, and whitelist filters. Instead of calculating an EFA-specific TransportDiscoveryPlan in Store, it could pass that configuration to the Transfer Engine:
transfer_engine_->setAutoDiscover({
.enabled = auto_discover,
.protocol = protocol,
.filters = filters,
});|
I think this reviewer is right on the design, and I'd like to back it up with what I found while validating on a 32-EFA The premise checks out. In That's why this workaround already exists 5 times in-tree — The sharpest evidence: with Why I'd still merge this one first. That ladder is 16 nested preprocessor branches shared by Ascend, MACA, MNNVL, BAREX, SUNRISE, HIP and UB. Making the TE protocol-aware means touching the common install path for every platform, and most of those I can't test — I have EFA and TCP hardware, not Ascend or MACA. This PR is contained to Store and I've A/B-verified it end-to-end on real EFA hardware, including no-regression runs for So my suggestion: land this as the targeted fix, and open a follow-up issue for the TE-side refactor — That said, this is a maintainer call, not mine. If @Aionw or the maintainers would rather see it done properly in one pass, I won't argue the point — I'd just ask that the TE-side change get tested on at least one non-EFA accelerator before merge, since the blast radius is that shared ladder. |
|
Thanks to @whn09 for continuing the broader refactoring effort in this issue. Let’s keep this PR focused on fixing EFA auto-discovery. |
c6e29c3 to
9896e95
Compare
|
Thanks both. Rebased onto current main. |
|
To clarify my earlier review: I agree that this PR should remain a targeted EFA fix. I am not asking for a broad refactor of the Transfer Engine's platform-specific transport-selection ladder. However, I do not think the current implementation is the minimal targeted fix. The bug exists because Store calls: transfer_engine_->setAutoDiscover(auto_discover);without passing the configuration that tells the Transfer Engine that the requested protocol is EFA. The current patch works around that by disabling the Transfer Engine's discovery path, duplicating topology discovery in Store, introducing I suggest passing the relevant auto-discovery configuration, including the requested protocol, into transfer_engine_->setAutoDiscover({
.enabled = auto_discover,
.protocol = protocol,
});The Transfer Engine can then keep its existing topology-discovery path and make one targeted adjustment in the default transport-selection branch: if (auto_discover_config_.protocol == "efa") {
installTransport("efa", local_topology_);
} else {
// Keep the existing RDMA/TCP selection unchanged.
}The existing This approach would preserve the existing handling of:
It would also allow this PR to remove:
That should produce a substantially smaller diff while still keeping the change narrowly scoped to EFA auto-discovery. |
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Changed the PR to pass the protocol into setAutoDiscover() as suggested. |
Keep the explicit BAREX override ahead of protocol-aware EFA selection so existing BAREX configurations remain unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Could you take a look at the failed CI? Thanks |
|
I took another look at the failed CI. The relevant error is a linker failure involving This does not appear to be introduced by this PR:
This therefore looks more like a transient runner/container issue where the CUDA driver stub was unavailable or inaccessible, rather than a regression caused by the PR. I suggest rerunning the failed job. If the same |
Description
When Mooncake Store uses
protocol="efa"with an empty device list, genericdiscovery finds the EFA devices but installs Mooncake's
rdmatransport. Thattransport then attempts RC queue pairs, which EFA does not support.
This change passes the requested protocol into Transfer Engine auto-discovery.
The Transfer Engine keeps its existing topology-discovery path and selects
efainstead ofrdmawhen EFA was requested. Existing boolean callers retaintheir current behavior.
Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Test commands:
Test results:
The focused tests cover protocol-aware EFA selection and compatibility with
existing boolean auto-discovery callers. On an AWS
p6-b200.48xlargenode,the Store discovered all eight EFA devices, installed the
efatransport, andcompleted a verified put/get with
protocol="efa"and an empty device list.The test did not log RDMA RC queue-pair errors.
Checklist
./scripts/code_format.shpre-commit run --all-filesand all hooks passAll pre-commit hooks pass on the changed files. A repository-wide run still
fails on unrelated existing issues.
AI Assistance Disclosure
Codex helped investigate the existing EFA paths and prepare the
implementation, tests, documentation, and validation. The submitter reviewed
the changes before submission.