Skip to content

Commit ee186ad

Browse files
committed
bootstrap: redesign with unified API and P2P RPC mode
1 parent 76f9001 commit ee186ad

32 files changed

Lines changed: 1027 additions & 893 deletions

adaptor_plugin/ccl/example/plugin.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ static flagcxResult_t pluginGetStagedBuffer(const flagcxInnerComm_t comm,
3232
return flagcxInternalError;
3333
}
3434

35-
static flagcxResult_t pluginCommInitRank(flagcxInnerComm_t *comm, int nranks,
36-
flagcxUniqueId *commId, int rank,
37-
struct bootstrapState *bootstrap) {
35+
static flagcxResult_t
36+
pluginCommInitRank(flagcxInnerComm_t *comm, int nranks, flagcxUniqueId *commId,
37+
int rank, struct flagcxBootstrapState *bootstrap) {
3838
return flagcxInternalError;
3939
}
4040

flagcx/adaptor/ccl/bootstrap_adaptor.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ const char *bootstrapAdaptorGetLastError(flagcxInnerComm_t comm) {
7070
return "Not Implemented";
7171
}
7272

73-
flagcxResult_t bootstrapAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
74-
flagcxUniqueId_t /*commId*/,
75-
int rank,
76-
bootstrapState *bootstrap) {
73+
flagcxResult_t
74+
bootstrapAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
75+
flagcxUniqueId_t /*commId*/, int rank,
76+
struct flagcxBootstrapState *bootstrap) {
7777
if (*comm == NULL) {
7878
FLAGCXCHECK(flagcxCalloc(comm, 1));
7979
}

flagcx/adaptor/ccl/cncl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ const char *cnclAdaptorGetLastError(flagcxInnerComm_t comm) {
6262
return "Not Implemented";
6363
}
6464

65-
flagcxResult_t cnclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
66-
flagcxUniqueId_t commId, int rank,
67-
bootstrapState * /*bootstrap*/) {
65+
flagcxResult_t
66+
cnclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
67+
flagcxUniqueId_t commId, int rank,
68+
struct flagcxBootstrapState * /*bootstrap*/) {
6869
if (*comm == NULL) {
6970
flagcxCalloc(comm, 1);
7071
}

flagcx/adaptor/ccl/dunccl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ const char *duncclAdaptorGetLastError(flagcxInnerComm_t comm) {
3131
return ncclGetLastError(comm->base);
3232
}
3333

34-
flagcxResult_t duncclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
35-
flagcxUniqueId_t commId, int rank,
36-
bootstrapState * /*bootstrap*/) {
34+
flagcxResult_t
35+
duncclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
36+
flagcxUniqueId_t commId, int rank,
37+
struct flagcxBootstrapState * /*bootstrap*/) {
3738
if (*comm == NULL) {
3839
flagcxCalloc(comm, 1);
3940
}

flagcx/adaptor/ccl/eccl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ flagcxResult_t ecclAdaptorGetStagedBuffer(const flagcxInnerComm_t comm,
3535
return flagcxNotSupported;
3636
}
3737

38-
flagcxResult_t ecclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
39-
flagcxUniqueId_t commId, int rank,
40-
bootstrapState * /*bootstrap*/) {
38+
flagcxResult_t
39+
ecclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
40+
flagcxUniqueId_t commId, int rank,
41+
struct flagcxBootstrapState * /*bootstrap*/) {
4142
if (*comm == NULL) {
4243
flagcxCalloc(comm, 1);
4344
}

flagcx/adaptor/ccl/gloo_adaptor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const char *glooAdaptorGetLastError(flagcxInnerComm_t comm) {
8585

8686
flagcxResult_t glooAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
8787
flagcxUniqueId_t /*commId*/, int rank,
88-
bootstrapState *bootstrap) {
88+
struct flagcxBootstrapState *bootstrap) {
8989
// Create gloo transport device
9090
std::shared_ptr<::gloo::transport::Device> dev;
9191
flagcxNetProperties_t *properties =

flagcx/adaptor/ccl/hccl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ const char *hcclAdaptorGetLastError(flagcxInnerComm_t comm) {
9494
return "Not Implemented";
9595
}
9696

97-
flagcxResult_t hcclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
98-
flagcxUniqueId_t commId, int rank,
99-
bootstrapState * /*bootstrap*/) {
97+
flagcxResult_t
98+
hcclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
99+
flagcxUniqueId_t commId, int rank,
100+
struct flagcxBootstrapState * /*bootstrap*/) {
100101
if (*comm == NULL) {
101102
flagcxCalloc(comm, 1);
102103
}

flagcx/adaptor/ccl/ixnccl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ const char *ixncclAdaptorGetLastError(flagcxInnerComm_t comm) {
3131
return ncclGetLastError(comm->base);
3232
}
3333

34-
flagcxResult_t ixncclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
35-
flagcxUniqueId_t commId, int rank,
36-
bootstrapState * /*bootstrap*/) {
34+
flagcxResult_t
35+
ixncclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
36+
flagcxUniqueId_t commId, int rank,
37+
struct flagcxBootstrapState * /*bootstrap*/) {
3738
if (*comm == NULL) {
3839
flagcxCalloc(comm, 1);
3940
}

flagcx/adaptor/ccl/mccl_adaptor.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ const char *mcclAdaptorGetLastError(flagcxInnerComm_t comm) {
3636
return mcclGetLastError(comm->base);
3737
}
3838

39-
flagcxResult_t mcclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
40-
flagcxUniqueId_t commId, int rank,
41-
bootstrapState * /*bootstrap*/) {
39+
flagcxResult_t
40+
mcclAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
41+
flagcxUniqueId_t commId, int rank,
42+
struct flagcxBootstrapState * /*bootstrap*/) {
4243
if (*comm == NULL) {
4344
flagcxCalloc(comm, 1);
4445
}

flagcx/adaptor/ccl/mpi_adaptor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const char *mpiAdaptorGetLastError(flagcxInnerComm_t comm) {
9191

9292
flagcxResult_t mpiAdaptorCommInitRank(flagcxInnerComm_t *comm, int nranks,
9393
flagcxUniqueId_t /*commId*/, int rank,
94-
bootstrapState *bootstrap) {
94+
struct flagcxBootstrapState *bootstrap) {
9595
int initialized;
9696
MPI_Initialized(&initialized);
9797

0 commit comments

Comments
 (0)