Commit Graph

24 Commits

Author SHA1 Message Date
Vincent 4d7c1a19b0
[TE] fix: improve auto gid selection and retry (#2269) 2026-06-03 20:52:24 +08:00
ccs668899 489c020778
[transfer_engine] fix: drain endpoint waiting list via periodic reclaim (#1952)
* [transfer_engine] fix: add periodic endpoint reclaim from monitorWorker

reclaimEndpoint() is currently invoked only from RdmaContext::endpoint()
after a new insertion. Under healthy load, insertions and evictions are
1:1 so this works. Under failure load -- many error completions trigger
deleteEndpoint(), but new-insertion traffic stalls because the dead peer
isn't generating new connection paths -- waiting_list_ grows without
bound and QPs never get destroyed.

Add a 1Hz reclaimEndpoints() call from monitorWorker on the existing
1-second context heartbeat. This decouples reclaim cadence from
insertion traffic.

See issue #1845.

* [transfer_engine] test: endpoint_store reclaim coverage for #1845

Adds unit + integration coverage for the periodic reclaim fix.

endpoint_store_test (5 tests, no RDMA device, runs under ctest):
  - reclaim drains quiescent entries on its own
  - reclaim leaves active entries alone (gate preserved)
  - reclaim is idempotent when empty
  - leak manifests without reclaim call (1118-eviction mirror of reporter)
  - reclaim works without active map (guard against insert/reclaim coupling)

endpoint_store_integration_test (requires RDMA device, not auto-registered):
  - Verifies WorkerPool::monitorWorker actually calls reclaimEndpoints at
    ~1 Hz by constructing a real RdmaContext and waiting for the tick to
    drain injected entries. Confirms the end-to-end fix wiring.

Supporting changes:
  - EndpointStore::waitingListSize() accessor (diagnostics + tests)
  - SIEVEEndpointStore::testOnlyInsertWaiting() for test injection
  - RdmaContext::endpointStore() accessor (diagnostics + tests)

* [docs] note periodic reclaim behavior and #1845 symptom

- design/transfer-engine: add a sentence to Endpoint Management explaining
  that waiting_list_ drains both on insertion and on the monitorWorker
  heartbeat, so accumulated reclaim does not stall under failure load.
- troubleshooting: extend the "Failed to create QP: Cannot allocate
  memory" entry with a bullet pointing at issue #1845 so operators
  seeing the symptom find the cause and the fix.

* [transfer_engine] fix: guard FIFOEndpointStore::waitingListSize with atomic counter

Per PR #1952 review: FIFO variant returned waiting_list_.size() on
std::unordered_set without holding endpoint_map_lock_, racing
concurrent modification. Mirror the SIEVE pattern with an atomic
waiting_list_len_ incremented in delete/evict, decremented in reclaim.

* [transfer_engine] test: suppress intentional RdmaTransport leak under LSAN

CI build (3.10/3.12) runs with -DENABLE_ASAN=ON and LSAN flagged the
5 × 288 byte allocation the test fixture intentionally leaks
(~RdmaTransport dereferences a null metadata_ unless install() ran).
Gate on __SANITIZE_ADDRESS__ / __has_feature and mark the pointer with
__lsan_ignore_object so real leaks are still caught.

* [transfer_engine] fix: widen waiting_list_len_ atomic to size_t

waitingListSize() returns size_t but the underlying counter was atomic<int>,
which quietly narrowed on load. Promote to atomic<size_t> in both FIFO and
SIEVE so the getter is a clean pass-through with no implicit conversion.

* [transfer_engine] docs: pin reclaimEndpoint lock contract on base interface

monitorWorker now calls reclaimEndpoint() via RdmaContext; it already
acquired endpoint_map_lock_ internally, but nothing declared that. Codify
the precondition on the base so future callers know not to hold the lock.
RWSpinlock is non-reentrant, so recursive acquisition would deadlock.

* [transfer_engine] refactor: narrow RdmaContext endpoint store test surface

Previously exposed a raw EndpointStore* via RdmaContext::endpointStore()
for the integration test. A raw pointer is easy to misuse outside of
tests and couples the caller to the concrete store via dynamic_cast.

Replace with two narrow methods on RdmaContext: waitingListSize() (value
return) and testOnlyInsertWaiting(shared_ptr<RdmaEndPoint>). The latter
is lifted onto the EndpointStore base interface and implemented on both
FIFO and SIEVE, so the integration test no longer downcasts.

* [transfer_engine] test: register endpoint_store_integration_test with ctest

Integration test was previously unregistered and invoked manually. Now
self-skips via GTEST_SKIP when no RDMA device is present, so it runs
cleanly on CI runners without RDMA (skips) and on rxe/mlx5 hosts
(executes). Labeled "rdma" for ctest -L filtering.

* [transfer_engine] perf: short-circuit FIFO reclaim when waiting list is empty

monitorWorker now drives reclaim at ~1 Hz regardless of activity. On FIFO
this grabbed endpoint_map_lock_ as WriteGuard every tick even in the
common steady-state case where waiting_list_ is empty. Add the same
counter-check short-circuit SIEVE already has.

* [transfer_engine] test: skip integration test when RdmaContext::construct fails

GHA ubuntu-22.04 runners enumerate a phantom mlx5_0 via ibv_get_device_list
without a working port/GID, so pickRdmaDevice() returns a non-empty name
and the earlier GTEST_SKIP on empty device list doesn't fire. Then
construct() fails with ERR_CONTEXT and the hard ASSERT_EQ fails the test.

Convert the assertion to a GTEST_SKIP on construct failure. Matches the
"attempt setup, skip on failure" convention used elsewhere in the repo
(e.g., client_local_hot_cache_test.cpp:794-799).
2026-04-27 10:32:34 +08:00
王鹤男 952da65651
[TE] PTE-aware auto-split large MR registration for EFA transport (#1912)
* feat(efa): auto-split large MR registrations exceeding max_mr_size

Buffers larger than the EFA device's max_mr_size are now transparently
split into chunks, each registered as a separate MR. This fixes the
silent truncation bug where only the first max_mr_size bytes were
registered, causing transfers to unregistered regions to fail at runtime.

Key changes:
- Query EFA device max_mr_size via ibverbs during init (libfabric does
  not expose this) and clamp globalConfig accordingly
- Auto-split buffers > (max_mr_size - 1GB) into chunks in
  registerLocalMemoryInternal, each with its own BufferDesc metadata
- Track chunk mappings for proper cleanup in unregisterLocalMemory
- Change lkey()/rkey() from exact-match to range lookup (matching
  mrDesc() pattern) so key lookups work for any address within a chunk
- Replace silent truncation in EfaContext with a hard error as safety net
- Remove preTouchMemory truncation to touch the full buffer

Tested on P5EN (16 EFA NIC, max_mr_size=192GB): 191GB single-chunk
registration succeeds. Auto-split triggers correctly for larger buffers
(200GB splits into 191GB + 9GB). Total registerable size per buffer is
bounded by system pinned_vm limits (~191GB on 16-NIC P5EN).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): per-NIC partition for large buffer MR registration

Each EFA NIC can only register up to max_mr_size total. The previous
auto-split approach registered every chunk on ALL NICs, hitting the
per-NIC limit for buffers > max_mr_size. This change assigns each
chunk to a disjoint subset of NICs, enabling registration of buffers
up to max_mr_size × num_NICs (e.g. ~1.5TB on P5EN with 16 NICs).

Key changes:
- chunk_limit = max_mr_size / 2 (was max_mr_size - 1GB) for headroom
- NIC assignment: chunks distributed evenly across available NICs
- selectDevice(): skips NICs with rkey=0 (unassigned for that chunk)
- Striping path: filters by lkey!=0 to avoid unregistered NICs
- Unregister: only deregisters from assigned NICs per chunk
- ChunkRegistration struct tracks per-chunk NIC assignments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): PTE-aware auto-split replaces conservative max_mr_size/2 threshold

The previous chunk_limit of max_mr_size/2 (~96GB on P5EN) caused unnecessary
buffer splitting even when hugepages were available. This detects the actual
backing page size via /proc/self/smaps and computes the PTE-based limit:
  - 4KB pages: 22M PTEs × 4KB = 88GB (genuine hardware constraint)
  - 2MB hugepages: 22M PTEs × 2MB = 44TB (effectively max_mr_size)

Verified on P5EN (H200, 16 EFA): 100GB pool with hugepages no longer splits,
restoring full 16-NIC throughput (108 GB/s vs 46 GB/s with the old threshold).
MR registration time dropped from 302s to 1.6s.

Adds MC_EFA_MAX_PTE_ENTRIES env var for override (default 22M).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): add KV cache prefix transfer benchmark script

Python benchmark to measure EFA transfer performance for LLM prefix
cache hit scenarios. Tests different pool sizes (10GB-500GB) and prefix
lengths (4K-32K tokens) to evaluate per-NIC partition impact on
transfer latency and throughput.

Default KV bytes/token matches GLM-5.1 (754B MoE, MLA attention):
(kv_lora_rank=512 + qk_rope_head_dim=64) * 2 * 78 layers = 88KB/token

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(bench): add connection warmup before benchmark loop

The first prefix size's measurements were skewed by EFA connection
establishment (openSegment, endpoint creation). Add 3 small transfers
before entering the benchmark loop to warm up the connection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(bench): per-offset warmup and p50 throughput reporting

Warmup now exercises all offsets the benchmark will measure, eliminating
first-access TLB/page-fault outliers (4K token p99 dropped from 80ms to
3.5ms). Throughput is reported from p50 latency instead of avg for more
stable numbers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(bench): add --threads option for concurrent prefix transfer

Adds optional multi-threaded transfer support. Each thread transfers a
chunk of the prefix in parallel via separate transfer_sync_read calls.
Default is 1 (single transfer, same as before). Testing shows threads=2
matches single-thread throughput (~108 GB/s), while higher values add
scheduling overhead with no benefit since EFA already stripes internally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): full NIC coverage for multi-chunk MR registration

When a buffer exceeds max_mr_size and must be split into multiple chunks,
register every chunk on ALL NICs instead of disjoint per-NIC partition,
as long as total PTE usage per NIC fits within the PTE budget.

With hugepages (2MB), 500GB buffer uses only 250K PTE/NIC (budget: 24M),
so all 16 NICs cover every address. Falls back to disjoint partition when
PTE budget is exceeded (e.g. 4KB pages with large buffers).

500GB pool throughput: 35 GB/s (disjoint, 5-6 NIC) → 108 GB/s (full, 16 NIC).
Registration time unchanged (~9.5s) due to parallel MR registration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(bench): add batch memory registration benchmark

Test script for registering multiple independent memory blocks
(e.g. multi-tenant KV cache pools). Supports both per-block
register_memory and batch_register_memory APIs. Target mode
allocates and registers N blocks; initiator mode transfers
data and measures throughput.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: apply clang-format to EFA transport files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): expose discoverTopology C API and Rust bindings

Add discoverTopology() to the C API and discover_topology()/install_transport()
to the Rust bindings, enabling EFA transport initialization from C/Rust callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(efa): add C API test for discoverTopology and EFA transport

Verify that the new discoverTopology() C API correctly populates the
device list, enabling installTransport("efa") and memory registration
via the pure C interface (used by Rust/Go bindings).

All 4 tests passed on p5en.48xlarge (16 EFA NICs).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(efa): O(log n) MR lookup and chunk registration rollback

- Replace unordered_map with std::map for mr_map_ and use upper_bound
  for O(log n) range lookups in rkey/lkey/mrDesc instead of O(n) scan
- Add rollbackChunks lambda to unregister already-registered chunks on
  failure in registerLocalMemoryInternal, preventing MR leaks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: apply clang-format to efa_c_api_test.cpp

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: rename thr_tag to thread_tag to pass typos spell check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(efa): round-robin multi-chunk MR and large MR registration test

When a buffer splits into more chunks than available NICs, round-robin
assign chunks across NICs with per-NIC PTE budget validation, instead
of hard-failing with "Buffer requires N chunks but only M NICs".

Add efa_single_nic_large_mr_test: tests single-NIC and all-NIC large
MR registration with hugepages. Supports --chunk_gb for multi-buffer
mode (e.g. 200×2GB).

Verified on P5EN (16 EFA NIC, 2MB hugepages):
  - 1 NIC × 200×2GB (400GB): 53.7s
  - 16 NICs × 200×2GB (400GB): 64.8s
  - 1 NIC × 200GB single buffer: 2.7s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(efa): add cross-node transfer test for multi-buffer MR registration

Tests 200x2GB buffer registration on all NICs with actual data transfer
between two P5EN nodes. Supports target/initiator modes with single-read
and multi-block batch benchmarks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(efa): avoid CUDA context leak when built without GPU support

libfabric 2.4's EFA provider dlopens libcudart/libcuda during
fi_getinfo/fi_domain to detect HMEM support, even though the caller
never touches GPU memory. This creates a CUDA primary context on
GPU 0 and permanently holds ~616 MiB of device memory.

When Mooncake is built with USE_CUDA=OFF (and USE_HIP=OFF), set
FI_HMEM=system before fi_getinfo and drop FI_MR_HMEM from the domain
hints so the provider skips GPU hmem initialization entirely.

* feat(efa): multi-thread initiator and wildcard location for 16-NIC coverage

Register target buffers with wildcard location "*" instead of "cpu:0"
so initiator-side remote NIC selection distributes evenly across all 16
NICs (both NUMA nodes). With "cpu:0", selectDevice only picked NUMA-0's
8 NICs, leaving NUMA-1 idle — throughput capped at ~107 GB/s instead of
~149 GB/s on P5EN (16×EFA 200Gbps).

Also convert the initiator from single-threaded to multi-threaded
(--threads flag) and print the actual P2P handshake address.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(efa): add p6-b300 bandwidth results (752 GB/s GPU, 230 GB/s CPU)

- GPU-to-GPU peak 752 GB/s write / 713 GB/s read at ~94% line rate
  (16×400 Gbps = 800 GB/s theoretical)
- CPU-to-CPU peak 230 GB/s, DRAM-limited on Xeon 8559C
  (NUMA-0 NICs 90 Gbps vs NUMA-1 NICs 53 Gbps)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(rust): customer_pattern sample for per-NUMA multi-MR registration

Adds a Rust binary mirroring the customer's EFA usage pattern: target
registers many MRs per NUMA (e.g. 16 NICs x N x 10GB via cpu:<numa>
locations); initiator reads/writes a specific (numa, buffer_index)
tuple, using --source-numa to pick which local NIC set is exercised.

Also makes rust/build.rs robust against non-default transfer_engine
build configurations: etcd-cpp-api is opt-in via MOONCAKE_WITH_ETCD=1,
CUDA linking is opt-in via MOONCAKE_WITH_CUDA=1 with CUDART_LIB_DIR
override, and libbase.a + libasio.so + libfabric paths are picked up
whether the repo uses the standalone or top-level CMake layout.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore(rust): drop customer_pattern sample from upstream

Revert Cargo.toml [[bin]] additions and remove the bench demo source so
the public tree no longer ships it. Keep it gitignored locally so it can
be iterated on without accidental re-adds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(efa): eager endpoint warmup for segments to remove first-batch stall

libfabric FI_EP_RDM endpoints resolve peer addresses lazily — the first
submitTransfer() to a new segment serializes fi_av_insert + handshake over
every (local_ctx, peer_nic) pair. On 16-NIC instances this is a ~4 s stall
on the first 100 × 0.5 MB batch (measured on p6-B300).

Add EfaTransport::warmupSegment(name) that pre-connects all pairs
concurrently via std::async, plus C wrapper warmupEfaSegment() (guarded by
USE_EFA) and Rust binding TransferEngine::warmup_efa_segment(). Idempotent,
safe to re-run after metadata changes. RDMA/TCP paths untouched.

Measured on p6-B300 (16 × 16 endpoints, dual-NUMA initiator):
  first-batch: 4043 ms -> 13.5 ms (~300x)
  steady-state: 141 GB/s -> 230 GB/s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(efa): enable auto-split when max_mr_size is not configured

When MC_EFA_MAX_MR_SIZE is unset, max_mr was 0 and chunk_limit collapsed
to 0, bypassing the PTE-aware split entirely. Large 4KB-paged buffers
then hit the per-NIC PTE ceiling at registration time.

Fall back to pte_limit so splitting kicks in based on the PTE budget
alone when no explicit max_mr_size is provided.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* style: apply clang-format to EFA transport/tests and PEP8 to kvcache bench

Pure formatting changes to satisfy CI format hook (clang-format-20) and
address Gemini review comment on kvcache_prefix_bench.py indentation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-13-185.us-east-2.compute.internal>
Co-authored-by: whn09 <whn09@github.com>
2026-04-20 15:04:49 +08:00
Chuang Zhang 3a69fa4b4d
[TE] Enabling UB Transport on the Kunpeng SuperNode Phase 2 (#1855) 2026-04-15 00:15:34 +08:00
hemist b0c472dd72
[TE] Add Multi-Protocol Support for DRAM-CXL-SSD tiered storage (#1832)
Co-authored-by: qiuweitao <qiuweitao@ieisystem.com>
2026-04-09 10:36:14 +08:00
phantomlei 223405db96
[TE] feat: setup the RDMA for mlu device. (#1799) 2026-04-08 12:08:53 +08:00
Chuang Zhang 6da25727f8
[TE] Enabling UB Transport on the Kunpeng SuperNode Phase 1 (#1805)
* add the support for ub transport

* refine the code format

* change some log for ub transport

* change ub_transport to kunpeng_transport

* add the support for ub transport

* refine the code format

* change some log for ub transport

* change ub_transport to kunpeng_transport

* clean some comments and unused code

* fix the config.h merge error

* fix the code with review suggestion

* add the usage docs and refine some code for code review

* fix some comments with chinese and modify the CMakeLists.txt file
2026-04-07 10:41:19 +08:00
Zhanhao Cao 4b3d44f39f
[TE] Fix simultaneous open handshake in RdmaEndpoint (#1733)
* [TE] Fix simultaneous open handshake in RdmaEndpoint

* Keep the same logic for ERDMA.

* apply gemini-code-assist's suggestion.

* Fix endpoint reinitialization.

* Add disconnect and waiting with back-off.

* Add eRDMA Endpoint Re-establishment Test

* Include the test in cmake

* Address reviewer comments

* Better log message.
2026-03-30 10:03:12 +08:00
ascend-direct-dev 6e40f95935
add ascend direct transport unit test (#1543)
Co-authored-by: youxiao <youxiao@huawei.com>
2026-02-14 19:22:14 +08:00
王鹤男 4136d2b73b
[TE] Add AWS EFA transport using libfabric (#1509)
* [TE] Add AWS EFA transport using libfabric

Add EfaTransport as a new transport backend for AWS Elastic Fabric
Adapter (EFA) devices.  EFA exposes RDMA-like NICs but does not support
the full ibverbs QP API, so this transport uses libfabric's FI_EP_RDM
(Reliable Datagram Message) endpoint type instead.

Architecture (per EFA device):
  EfaTransport → EfaContext → EfaEndPoint
  - EfaContext: owns fabric/domain/AV/CQ/MR resources
  - EfaEndPoint: one RDM endpoint per peer, with address-vector addressing
  - Dedicated CQ poller thread per device for responsive completion draining

Key design decisions:
  - FI_THREAD_SAFE requested from provider; per-endpoint spinlock on
    fi_write as safety net for concurrent submission threads
  - Atomic CAS reservation of CQ and WR capacity before posting fi_write
    to prevent CQ overflow under high concurrency
  - CQ error path drains all queued errors (fi_cq_readerr loop) before
    returning, per libfabric semantics
  - Retry-with-backoff on CQ/WR full instead of immediate slice failure
  - Thread-safe endpoint creation via atomic getOrInsert to prevent
    duplicate endpoints for the same peer
  - Handshake exchanges EFA endpoint addresses via dedicated efa_addr
    field in HandShakeDesc

Build: cmake -DUSE_EFA=ON (requires libfabric from AWS EFA installer)
Tested on p6-b200.48xlarge (8 EFA devices, 8×400 Gbps): 59.72 GB/s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [TE] Add EFA unit tests and bench tool support

Add efa_transport_test with 5 test cases:
  - InstallTransport: verify EFA transport installation
  - LoopbackWrite: basic loopback write operation
  - WriteAndRead: write then read with data integrity check
  - MultiWrite: batch write (16 requests)
  - StressMultipleBatches: stress test (20 batches × 8 requests)

Add --protocol=efa support to transfer_engine_bench with manual
topology discovery (EFA needs explicit discover() since
TransferEngine(false) skips auto-discovery).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Add EFA transport documentation

Add comprehensive EFA transport documentation covering:
  - Prerequisites and build instructions
  - Usage with vLLM (prefill/decode disaggregation)
  - Unit test descriptions and environment variables
  - Benchmark results on p6-b200.48xlarge: 59.72 GB/s (EFA) vs
    9.5 GB/s (TCP iperf3) vs 0.11 GB/s (Mooncake TCP transport)
  - EFA vs RoCE RDMA comparison table
  - Thread safety design notes
  - Troubleshooting guide

Add EfaTransport to the transfer-engine index toctree and supported
transport lists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [TE] Address PR review: ifdef EFA fields, use find_package for libfabric

- Wrap efa_addr in HandShakeDesc with #ifdef USE_EFA in transfer_metadata.h
- Wrap efa_addr serialization/deserialization with #ifdef USE_EFA in transfer_metadata.cpp
- Replace hardcoded /opt/amazon/efa paths with find_path/find_library in common.cmake
- Remove redundant hardcoded EFA paths from all CMakeLists.txt files
- Fix git clone URL in efa-transport.md to use official kvcache-ai/Mooncake repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Update EFA benchmark results with tuned parameters (170 GB/s)

Update benchmark documentation with comprehensive parameter tuning results
from cross-machine testing on p6-b200.48xlarge instances. Key finding:
MC_SLICE_SIZE=262144 nearly doubles EFA throughput from ~70 to ~170 GB/s,
reaching 88% of RoCE RDMA performance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix clang-format violation in transfer_metadata.h

Remove extra space before comment on efa_addr field to satisfy
clang-format-20 style check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Add EFA latency benchmark script, rename efa doc to underscore

- Add efa_latency_bench.py: automated benchmark script that measures
  EFA throughput for tuned/default configs via SSH and plots
  Latency vs Cache Size chart
- Add efa_latency_bench.png: benchmark results chart
- Rename efa-transport.md -> efa_transport.md to match naming
  convention of other transport docs (ascend_transport.md, etc.)
- Update toctree reference in index.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-25-79.us-east-2.compute.internal>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-204.us-east-2.compute.internal>
2026-02-08 11:41:17 +08:00
1180300720 b5e610a2eb
ubshmem transport with fabric mem without conflicts (#1399)
Co-authored-by: ZhaoBaiwei <zhaobaiwei@huawei.com>
2026-01-26 15:18:20 +08:00
R0CKSTAR d116df6c4e
[MUSA] Enable USE_MNNVL (#1176)
* [MUSA] Enable USE_MNNVL

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Correct clang format

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* Address comments

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

* ci: add build-musa

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>

---------

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
2025-12-08 15:28:48 +08:00
Anatolii Rozanov 1373d5875f
[TE] Improve AMD HIP support with hipify-perl (#1154)
* Improve AMD HIP support with hipify-perl

This commit improves AMD GPU support by migrating to hipify-perl
for automatic CUDA-to-HIP code conversion at build time, and extends HIP
compatibility to the NVLink transport layer.

* [TE] Add HIP support to nvlink-allocator with hipcc compilation

* Add USE_HIP to the documentation

* [TE/NVLINK] Check CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED only if USE_CUDA

* [TE/EXAMPLE] Fix compiler error if USE_MNNVL and USE_HIP

* Address review  comments
2025-12-05 21:01:42 +08:00
hemist 7cdae81466
[TransferEngine] feat: Support CXL shared memory, and provide simple unit tests. (#670)
* [TransgerEngine] Add cxl transport test

* [Transfer Engine] Add cxl transfer support

* [TransferEngine] Update the way of obtaining the size of CXL memory from daxctl to env variable && fix some bugs.

* [CXL transport] refactor code & add test

* [TransferEngine] fix: modify the parameters of submitTransferTask() to match the base class 'Transport'.

* [TransferEngine] fix: update etcd address

* [TransferEngine] fix: unit tests error caused by cxl_transport

* Update mooncake-common/common.cmake

* [TransferEngine] fix: add some validity checks.

---------

Co-authored-by: YiHong Lian <lianyihong@ieisystem.com>
Co-authored-by: Karl Zhao <zhaozhiyuan05@ieisystem.com>
Co-authored-by: Teng Ma <sima.mt@alibaba-inc.com>
Co-authored-by: Teng Ma <805522925@qq.com>
2025-08-01 15:54:59 +08:00
Stepan Kargaltsev e3a9178707
[TransferEngine] Add IPv6 support [2] (#628) 2025-07-18 00:47:04 +08:00
Shangming Cai f96a591295
[TransferEngine] Change option use_nvlink to use_mnnvl to clarify the usage (#525)
Signed-off-by: Shangming Cai <caishangming@linux.alibaba.com>
2025-06-19 20:51:52 +08:00
Feng Ren 5b70626874
[TransferEngine] Enable NVLink transport across multiple processes (#442)
* [TransferEngine]Enable NVLINK transport across multiple processes in the same machine

Signed-off-by: Feng Ren <alogfans@gmail.com>

* update locking stragegy and fix minor problems

* removing thread pool in nvlink transport

* add the support of fabric

* add include

* fix compile bugs

* fix bug

* fix bugs

* add test code in nvlink transport

* minor fix

* enable cuda memory allocation in pywrapper

* extract supportFabricMem()

---------

Signed-off-by: Feng Ren <alogfans@gmail.com>
2025-06-06 13:21:37 +08:00
Eryu Guan 9ce2e203d8
[TransferEngine] build: add USE_TCP option to control enable tcp transport or not (#282)
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2025-04-23 18:55:22 +08:00
Feng Ren b621808409
[TransferEngine] Use RDMA transport to transfer data in local process rapidly (#220) 2025-04-09 13:16:55 +08:00
Feng Ren 206198bc20
[TransferEngine] Fix compilation bugs of nvmeof transport (#174) 2025-03-31 10:00:40 +08:00
doujiang24 86a8649bfb
[TransferEngine] feature: registerLocalMemory support the "*" location. (#86)
* [TransferEngine] feature: registerLocalMemory support the "*" location.

1. try best to recognize the cpu numa node for now,
2. use all nic when failed to get the numa node,
3. will support cuda memory in the feature.

Signed-off-by: doujiang24 <doujiang24@gmail.com>

* fix test when there is only one numa node

Signed-off-by: doujiang24 <doujiang24@gmail.com>

---------

Signed-off-by: doujiang24 <doujiang24@gmail.com>
2025-01-23 16:48:10 +08:00
doujiang24 503afb97fa [TransferEngine] test: cmake enable testing. 2025-01-06 16:54:07 +08:00
Shaoyuan CHEN fc0491985e
[TransferEngine] Add topology discovery (#46)
* add topology discovery

* update documentation and comments
2024-12-23 13:52:27 +08:00
Feng Ren 348afd7531 Squashed commits related to transfer engine 2024-11-27 13:02:39 +08:00