Skip to content

[CRL] Bootstrap extension#491

Merged
MC952-arch merged 7 commits into
flagos-ai:mainfrom
MC952-arch:bootstrap-extension
Jun 10, 2026
Merged

[CRL] Bootstrap extension#491
MC952-arch merged 7 commits into
flagos-ai:mainfrom
MC952-arch:bootstrap-extension

Conversation

@MC952-arch

@MC952-arch MC952-arch commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bootstrapState mode-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.

Comment thread flagcx/service/bootstrap.cc Outdated
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc Outdated
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/core/flagcx_p2p.cc
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
@MC952-arch MC952-arch force-pushed the bootstrap-extension branch from 8f1d10e to 228d3a1 Compare June 4, 2026 08:15
@MC952-arch MC952-arch requested a review from Copilot June 4, 2026 08:27
MC952-arch added a commit to MC952-arch/FlagCX that referenced this pull request Jun 4, 2026
@MC952-arch MC952-arch force-pushed the bootstrap-extension branch from 228d3a1 to 23785ef Compare June 4, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.

Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/core/flagcx_p2p.cc
Comment thread test/unittest/p2p/test_p2p_engine_rpc.cpp
MC952-arch added a commit to MC952-arch/FlagCX that referenced this pull request Jun 4, 2026
@MC952-arch MC952-arch force-pushed the bootstrap-extension branch from 23785ef to 6aac371 Compare June 4, 2026 09:59
@MC952-arch MC952-arch requested a review from Copilot June 4, 2026 09:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 6 comments.

Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/service/bootstrap.cc Outdated
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/core/flagcx_p2p.cc
Comment thread flagcx/service/bootstrap.cc
Comment thread flagcx/core/flagcx_p2p.cc
@MC952-arch MC952-arch force-pushed the bootstrap-extension branch from b253380 to 7cff6cb Compare June 10, 2026 03:12
@MC952-arch MC952-arch merged commit cc68810 into flagos-ai:main Jun 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants