[Bugfix][TENT] Forward classic RDMA device filters - #4028
Open
TTThanos wants to merge 1 commit into
Open
Conversation
Preserve the device whitelist passed through the classic TransferEngine API when MC_USE_TENT is enabled, and inject it into TENT's `topology/rdma_whitelist` before topology discovery. Keep explicit caller filters ahead of MC_TENT_CONF and MC_TE_FILTERS defaults, retain filters across move operations and the pre-init setter, and leave empty filters to the existing environment configuration. Add compatibility, configuration-precedence, move-semantics, and real multi-HCA regression coverage.
TTThanos
requested review from
00fish0,
ShangmingCai,
alogfans,
chestnut-Q,
doujiang24,
dtcccc and
staryxchen
as code owners
September 11, 2026 05:56
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
Refs #3995 (P0-device-filter).
When existing callers run through the classic Transfer Engine compatibility layer with MC_USE_TENT=1, the RDMA device filter passed to the classic API is currently dropped:
Python initialize(device_name)
-> buildDeviceFilter()
-> TransferEngine(auto_discover, filter)
-> TENT compatibility path drops filter
-> TENT discovers and initializes every local HCA
For example, calling:
engine.initialize(..., device_name="mlx5_bond_0")
on a host with four HCAs still causes TENT to discover and initialize all four devices.
This PR forwards the caller-provided filter into TENT's existing RDMA whitelist configuration:
Python initialize(device_name)
-> buildDeviceFilter()
-> classic TransferEngine constructor
-> tent_device_filter_
-> buildTentConfig()
-> topology/rdma_whitelist
-> platform probe filters discovered HCAs
-> only the requested RDMA contexts are initialized
Module
mooncake-transfer-engine)mooncake-store)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?
Tested in an Ubuntu 24.04 container on an mlx5/CX8 host with four RDMA HCAs.
Test commands:
The regression test constructs the compatibility engine with only the first device:
TransferEngine engine(/auto_discover=/true, {"mlx5_bond_0"});
and asserts:
engine.getLocalTopology()->getHcaList()
== std::vectorstd::string{"mlx5_bond_0"};
Command:
./build/mooncake-transfer-engine/tests/transport_uint_test
--gtest_filter='TransferEngineTentCompatibilityTest.ConstructorDeviceFilterRestrictsDiscoveredTopology'
Result: passed. The runtime log shows only mlx5_bond_0 reaching RDMA context/GID initialization even though all four HCAs were detected by the platform probe.
Test results:
Checklist
./scripts/code_format.shAI Assistance Disclosure