2018-09-24 16:06:59 -07:00
|
|
|
/*************************************************************************
|
2022-01-07 06:39:55 -08:00
|
|
|
* Copyright (c) 2015-2022, NVIDIA CORPORATION. All rights reserved.
|
2018-09-24 16:06:59 -07:00
|
|
|
*
|
|
|
|
|
* See LICENSE.txt for license information
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef NCCL_BOOTSTRAP_H_
|
|
|
|
|
#define NCCL_BOOTSTRAP_H_
|
|
|
|
|
|
|
|
|
|
#include "nccl.h"
|
2022-01-07 06:39:55 -08:00
|
|
|
#include "comm.h"
|
2018-09-24 16:06:59 -07:00
|
|
|
|
2022-11-29 04:27:46 -08:00
|
|
|
struct ncclBootstrapHandle {
|
|
|
|
|
uint64_t magic;
|
|
|
|
|
union ncclSocketAddress addr;
|
|
|
|
|
};
|
|
|
|
|
static_assert(sizeof(struct ncclBootstrapHandle) <= sizeof(ncclUniqueId), "Bootstrap handle is too large to fit inside NCCL unique ID");
|
|
|
|
|
|
2019-06-25 13:22:47 -07:00
|
|
|
ncclResult_t bootstrapNetInit();
|
2022-11-29 04:27:46 -08:00
|
|
|
ncclResult_t bootstrapCreateRoot(struct ncclBootstrapHandle* handle, bool idFromEnv);
|
|
|
|
|
ncclResult_t bootstrapGetUniqueId(struct ncclBootstrapHandle* handle);
|
|
|
|
|
ncclResult_t bootstrapInit(struct ncclBootstrapHandle* handle, struct ncclComm* comm);
|
2023-04-03 05:32:07 -07:00
|
|
|
ncclResult_t bootstrapSplit(struct ncclBootstrapHandle* handle, struct ncclComm* comm, struct ncclComm* parent, int color, int key, int* parentRanks);
|
2018-09-24 16:06:59 -07:00
|
|
|
ncclResult_t bootstrapAllGather(void* commState, void* allData, int size);
|
2021-04-12 16:00:11 -07:00
|
|
|
ncclResult_t bootstrapSend(void* commState, int peer, int tag, void* data, int size);
|
|
|
|
|
ncclResult_t bootstrapRecv(void* commState, int peer, int tag, void* data, int size);
|
2021-09-08 13:56:25 -07:00
|
|
|
ncclResult_t bootstrapBarrier(void* commState, int *ranks, int rank, int nranks, int tag);
|
|
|
|
|
ncclResult_t bootstrapIntraNodeAllGather(void* commState, int *ranks, int rank, int nranks, void* allData, int size);
|
2023-02-27 02:48:21 -08:00
|
|
|
ncclResult_t bootstrapIntraNodeBroadcast(void* commState, int *ranks, int rank, int nranks, int root, void* bcastData, int size);
|
2018-09-24 16:06:59 -07:00
|
|
|
ncclResult_t bootstrapClose(void* commState);
|
2019-11-19 14:57:39 -08:00
|
|
|
ncclResult_t bootstrapAbort(void* commState);
|
2018-09-24 16:06:59 -07:00
|
|
|
#endif
|