rpc: support apple RDMA as an RPC transport (#26421)
* rpc: support apple RDMA as an RPC transport * remove set_tensor micro optimization, rpc socket pinning per CR * remove transparent reconnect * trigger apple builds on RPC changes --------- Co-authored-by: Ryan Churaman <rschu@meta.com>
This commit is contained in:
+12
-2
@@ -97,9 +97,19 @@ By default, the cache is stored in the `$HOME/.cache/llama.cpp/rpc` directory an
|
||||
|
||||
### RDMA transport
|
||||
|
||||
On Linux systems with RoCEv2-capable NICs (e.g. Mellanox ConnectX), the RPC backend can use RDMA instead of TCP for lower latency and higher throughput. The transport is negotiated automatically -- no changes to command-line usage are required.
|
||||
The RPC backend can use RDMA instead of TCP for lower latency and higher throughput. The transport is negotiated during the initial handshake -- no changes to command-line usage are required, and the connection falls back to TCP unless both peers can use RDMA.
|
||||
|
||||
RDMA is enabled by default when `libibverbs` is found at build time.
|
||||
Two providers are supported, each enabled by default when its library is found at build time:
|
||||
|
||||
- **Linux**: RoCEv2-capable NICs (e.g. Mellanox ConnectX), via `libibverbs`.
|
||||
- **macOS**: RDMA over Thunderbolt on Apple silicon Macs with Thunderbolt 5, via `librdma`. Requires macOS 26.2 or later, with RDMA enabled once from macOS Recovery via `rdma_ctl enable`. See [TN3205](https://developer.apple.com/documentation/technotes/tn3205-low-latency-communication-with-rdma-over-thunderbolt).
|
||||
|
||||
RDMA is point-to-point, so each side uses the local device whose GID matches the address the connection was made on. Connect over the RDMA-capable link -- with Thunderbolt, use the peer's Thunderbolt address in `--rpc`; a connection made over another interface stays on TCP.
|
||||
|
||||
To force plain TCP without rebuilding, set `GGML_RPC_NO_RDMA` on either peer:
|
||||
```bash
|
||||
$ GGML_RPC_NO_RDMA=1 bin/ggml-rpc-server
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user