Repository navigation
Add neighbor-only no-relay ring mode (LIBSIRCL_RING_ONLY / --ring-only) to SIRCL, libsircl, and installer - #400
Merged
Merged
Conversation
…d libsircl Support bare switchless cycles with 1 or 2 RDMA lanes per ring neighbor and no ConnectX hairpin relay table or diagonal QPs: - Extend the SIRCL RoCE proxy with ROCE_FEATURE_SPARSE_PEERS (bit 2, ABI 9 preserved) so symmetric sparse route tables connect only routed peers, reject diagonal links in set_links/set_forward/set_chain, and guard post_lane_write against unconnected peers. - Vendor the updated proxy into libsircl with matching SHA-256 and expose FEATURE_SPARSE_PEERS in the Python proxy binding. - Add LIBSIRCL_RING_ONLY=1 to libsircl/src/engine.c so all collectives run over neighbor-only ring links with zero arena/diagonal QPs, neighbor P2P works, non-neighbor P2P fails cleanly with ncclInvalidUsage, and receipts record ring_only. - Add --ring-only to libsircl/tools/site_routes.py to emit neighbor-only SIRCL_PEER_ROUTES and LIBSIRCL_RING_ONLY=1 while refusing relayed ring edges. - Add CPU, shm_verbs emulation, and site_routes unit tests and update libsircl documentation.
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.
Summary
Adds a neighbor-only, no-relay ring mode (
LIBSIRCL_RING_ONLY=1andsparkring install --transport libsircl --ring-only) for direct-cable pairs and closed cycles of 2–8 DGX Sparks with 1 or 2 RDMA lanes per neighbor and no ConnectX hairpin relay table or diagonal QPs:_roce_proxy.c+ vendoredsircl_roce_proxy.c): AddsROCE_FEATURE_SPARSE_PEERS(bit 2, ABI 9 preserved) so symmetric sparse route tables connect only routed neighbor peers, reject diagonal links inset_links/set_forward/set_chain, and guardpost_lane_writeagainst unconnected peers.libsircl(engine.c): AddsLIBSIRCL_RING_ONLY=1so all collectives (AllReduce,AllGather,ReduceScatter,Broadcast,Reduce,AlltoAll,Gather,Scatter,Fold, CUDA graphs) run over neighbor-only ring links with zero arena/diagonal QPs (forwarded=0,fw_lanes=0). Neighbor P2P (LIBSIRCL_P2P_CHANNELS=on) runs directly between ring neighbors and refuses diagonal peers cleanly withncclInvalidUsage.site_routes.py,libsircl.py,transport.py,install_workflow.py,stock_install.py): Adds--ring-onlyto emit neighbor-onlySIRCL_PEER_ROUTES,LIBSIRCL_RING_ONLY=1, andLIBSIRCL_RING_WINDOW=0without requiring a ConnectX relay table ("sircl"transport infabric.json), while refusing paths/partial arcs and non-libsircltransports.library_rank.py): ModelsLIBSIRCL_RING_ONLY=1schedule and receipt expectations (ring_only=True,cycle_plan=False, 60 fold ops).Verification
Offline / CPU / GPU Emulation
make check(nvcc 13.3 -Werror), RTX 5090 GPU emulation for 1-lane & 2-lane collectives + pair/ring P2P (arena_ops=0), SIRCL tests (84/84), vendored source SHA-256 checks (4/4).pytest runtime/common/test_libsircl.py runtime/common/test_transport.py runtime/host/test_stock_install.py spark_transport/libsircl/tests/test_site_routes.py— 187 passed,ruff checkclean,check_repository_layout.pypass,check_markdown_links.pypass (4,260 links).Real DGX Spark Hardware (4 × NVIDIA GB10
sm_121, Ring 4–7)Built ARM64
libsircl.so.0.6.0natively on GB10 (make check+probe_cuda_on_load.pypass) and ran over real RoCEv2 (LIBSIRCL_TRANSPORT=verbs,LIBSIRCL_FAIL_STOP=1,LIBSIRCL_RING_ONLY=1):library_rank.pyvsw4-ring.jsongolden):--lanes 1 --ring-only, 2 HCAs/host): 248/248 checks PASS (bad=0) on all 4 ranks.--lanes 2 --ring-only, 4 HCAs/host): 248/248 checks PASS (bad=0) on all 4 ranks."ring_only": true,"cycle_plan": false,"forwarded": 0,"fw_lanes": 0,"nat_ops": 0,"healthy": true.LIBSIRCL_P2P_CHANNELS=on, 1-lane & 2-lane):ncclSend/ncclRecv(1 B–4 MiB + 16) bit-exact in both directions on all 4 ranks.rank ^ 2) refused cleanly withncclInvalidUsage (5)(channels.refused=2), followed by bit-exactAllReduce.perf_rank.py, 4 Sparks, every rowcorrect=True,healthy=True):202.0 us(graph) -> 64 MiB13.13 GB/sbusbw (bf16),13.12 GB/s(fp32).204.3 us(graph) -> 64 MiB23.71 GB/sbusbw (bf16),23.83 GB/s(fp32, 1.82× scaling).