[CRL] Bootstrap extension#491
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the bootstrap layer to support a new P2P mode (RPC-style listen/connect/accept) alongside the existing collective/ring bootstrap, and wires that into the IB P2P engine so control-plane metadata + descriptor-table exchange can occur over a bootstrap socket rather than over the IB data socket.
Changes:
- Introduces
bootstrapStatemode-dispatch (COLL vs P2P), adds P2P listen/connect/accept APIs, and adds bootstrap accessor APIs (rank/nranks + net context). - Refactors collective bootstrap APIs into
bootstrapColl*entrypoints and updates a broad set of call sites to use them. - Updates the P2P engine handshake to use bootstrap P2P for handle/meta/descriptor-table exchange; adds new unit tests for bootstrap accessors and P2P RPC engine behavior.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unittest/p2p/test_p2p_engine_rpc.cpp | Adds unit tests for P2P engine RPC/bootstrap integration and handshake behaviors. |
| test/unittest/core/test_bootstrap_accessors.cpp | Adds unit tests for new bootstrap accessor APIs and bootstrapNetInit() behavior. |
| flagcx/service/include/bootstrap.h | Adds bootstrap mode/types, splits collective APIs into bootstrapColl*, adds P2P APIs + accessor APIs, updates typed-collective signatures. |
| flagcx/service/bootstrap.cc | Implements accessor APIs, refactors collective init/ops, adds unified send/recv/exchange/close dispatch, and implements bootstrap P2P listen/connect/accept. |
| flagcx/flagcx.cc | Updates collective bootstrap usage to new bootstrapColl* APIs and uses accessors for net properties. |
| flagcx/core/topo.cc | Switches topo exchange barriers/allgathers to bootstrapColl*. |
| flagcx/core/sym_heap.cc | Switches intra-node barriers to bootstrapCollIntraNodeBarrier. |
| flagcx/core/proxy.cc | Switches proxy peer address allgather to bootstrapCollAllGather. |
| flagcx/core/init.cc | Switches init allgather/barrier to bootstrapColl* and uses bootstrapCollInit for bootstrap state creation. |
| flagcx/core/include/topo.h | Types bootstrap field as struct bootstrapState*. |
| flagcx/core/include/global_comm.h | Types bootstrap field as struct bootstrapState*. |
| flagcx/core/flagcx_tuner.cc | Switches tuner sync to bootstrapColl* and types bootstrap pointer. |
| flagcx/core/flagcx_p2p.cc | Integrates bootstrap P2P into P2P engine control-plane handshake; exposes bootstrap listen port as “RPC port”. |
| flagcx/adaptor/include/mpi_adaptor.h | Updates bootstrap pointer types to struct bootstrapState*. |
| flagcx/adaptor/include/gloo_adaptor.h | Switches to bootstrapColl* for coordination and updates bootstrap pointer types. |
| flagcx/adaptor/include/flagcx_ccl_adaptor.h | Updates adaptor API signature bootstrap pointer type to struct bootstrapState*. |
| flagcx/adaptor/include/bootstrap_adaptor.h | Updates stored bootstrap pointer type to struct bootstrapState*. |
| flagcx/adaptor/flagcx_device.cc | Switches IPC bootstrap sync to bootstrapColl*. |
| flagcx/adaptor/ccl/xccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/tccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/rccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/pccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/nccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/musa_mccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/mpi_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/mccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/ixnccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/hccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/gloo_adaptor.cc | Switches from bootstrap-state-owned net props/ifname to new accessor APIs. |
| flagcx/adaptor/ccl/eccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/dunccl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/cncl_adaptor.cc | Updates bootstrap pointer type in init signature. |
| flagcx/adaptor/ccl/bootstrap_adaptor.cc | Uses accessor APIs for rank/nranks instead of direct struct fields; updates bootstrap pointer type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MC952-arch
added a commit
to MC952-arch/FlagCX
that referenced
this pull request
Jun 4, 2026
MC952-arch
added a commit
to MC952-arch/FlagCX
that referenced
this pull request
Jun 4, 2026
8f1d10e to
228d3a1
Compare
MC952-arch
added a commit
to MC952-arch/FlagCX
that referenced
this pull request
Jun 4, 2026
228d3a1 to
23785ef
Compare
MC952-arch
added a commit
to MC952-arch/FlagCX
that referenced
this pull request
Jun 4, 2026
23785ef to
6aac371
Compare
b253380 to
7cff6cb
Compare
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.
PR Category
CRL
PR Types
New Features
PR Description
This PR extends the bootstrap layer to support a new P2P mode (RPC-style listen/connect/accept) alongside the existing collective/ring bootstrap, and wires that into the IB P2P engine so control-plane metadata + descriptor-table exchange can occur over a bootstrap socket rather than over the IB data socket.