mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2518] [RFC]: AscendRdmaTransport — NPU↔RDMA Protocol Bridge #667
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#667
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tianlang-wq on GitHub (Jun 17, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2518
Originally assigned to: @tianlang-wq on GitHub.
Changes proposed
Problem
A Mooncake cluster may contain both NPU (Ascend) and DCU (Hygon) compute nodes that share a pool of Mooncake-Store nodes for KVCache data.
The store registers a single protocol to Mooncake-Metadata. This creates a split:
"rdma""ascend"At the hardware level, NPU device memory cannot be directly addressed by the RDMA NIC, so a standard
RdmaTransportcannot transfer NPU data. Conversely, theAscendDirectTransportuses Ascend HCCL which DCU does not support.Design: AscendRdmaTransport
AscendRdmaTransportis a protocol bridge installed on the NPU client side. It wraps an innerRdmaTransportand translates between NPU device memory and CPU-registered bounce buffers using Ascend ACL APIs.Architecture
Flow:
selectTransport()remapIn
MultiTransport::selectTransport()(multi_transport.cpp:410), whenUSE_ASCEND_RDMAis enabled:The store always registers with
"rdma"(native RDMA). On the NPU initiator side, the protocol is transparently remapped to"ascend_rdma", soAscendRdmaTransporthandles the transfer. If the initiator is a DCU node withoutUSE_ASCEND_RDMA, the protocol stays as"rdma"and a standardRdmaTransportis used.Transfer Paths
WRITE (NPU memory → remote Store via RDMA):
READ (remote Store → NPU memory via RDMA):
Two code paths handle these:
handleLargeTransfer, line 382)handleSmallTransfer, line 456)Lifecycle
install()— Allocates a 3 GB CPU bounce buffer (host_addr_), registers it with RDMA, pre-allocates NPU device blocks (dev_addr_), and starts a backgroundtransferLoopthread.submitTransferTask()— Delegates tohandleLargeTransferorhandleSmallTransferbased on opcode/size.getTransferStatus()— On completion, callscompleteReadBacklog()to perform the final H2D copy for READ operations.registerLocalMemory()— CPU memory is forwarded toRdmaTransport. NPU memory is recorded in metadata (RDMA cannot access it directly).Component Registration
AscendRdmaTransportregisters its local segment with protocol"ascend_rdma":This is a local-only protocol descriptor — the segment protocol exposed to remote nodes remains
"rdma"(set by the innerRdmaTransport's own segment registration). Remote peers see"rdma"and the remap only happens on the initiator side that hasUSE_ASCEND_RDMAenabled.Summary
AscendRdmaTransportenables heterogeneous NPU+DCU clusters by:"rdma"— DCU nodes connect directly; NPU nodes transparently bridge viaAscendRdmaTransport.USE_ASCEND_DIRECT(Ascend-native, for NPU↔NPU) andUSE_ASCEND_RDMA(Ascend↔RDMA bridge) are enabled, the system selects the optimal transport per transfer.Before submitting a new issue...
@github-actions[bot] commented on GitHub (Jun 17, 2026):
Thanks for opening this issue, @tianlang-wq!
225992489A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide