Re-enabled MSCCL++ (#1325)
* Added restrictions around calling MSCCL++ collectives (#1281)
* Added restriction to non-zero 32-byte multiple message sizes to MSCCL++ AllGather.
* Renamed and refactored some mscclpp types.
* Only transmit the MSCCL++ unique id for non-split comm init. For splitting comm, it has already been transmitted. Instead, save the MSCCL++ communicator in child communicators when calling `ncclCommSplit`. Only destroy MSCCL++ communicators when no RCCL communicators remain that use it. Also improved trace logging.
* Disable MSCCL++ when using managed memory buffers as it isn't supported.
* Added datatype and op constraints for MSCCL++ AllReduce.
* Added documentation on MSCCL++ restrictions to the README.
* [BUILD] Support custom CMake flags in MSCCLPP (#1275)
* [BUILD] Support custom CMAKE_PREFIX_PATH in MSCCLPP
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
* [BUILD] CMake flags to support build-id in MSCCLPP
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
* [BUILD] Fix CMake warnings in MSCCLPP build
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
* Wrapped all cmake arguments passed to mscclpp to remove empty arguments and properly format them.
---------
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
Co-authored-by: Corey Derochie <corey.derochie@amd.com>
* Link to libmscclpp_nccl statically (#1282)
* Switched mscclpp_nccl to static linking. Added a build step to rename the NCCL API functions.
* Undid separation of building libmscclpp_nccl from building librccl with MSCCL++ integration. With a static build, it's either fully enabled or fully disabled.
* `nm` isn't always available in docker containers due to being stripped down. Removed use of `nm` in `cmake` and hard-coded the output into mscclpp_nccl_syms.txt.
* Removed IBVerbs dependency for integrating with MSCCL++ (#1313)
* Renamed `RCCL_ENABLE_MSCCLPP` to `RCCL_MSCCLPP_ENABLE` to conform to MSCCL. Set `RCCL_MSCCLPP_ENABLE` to 1 by default if `ENABLE_MSCCLPP` is defined, or 0 otherwise. Added a log warning if `RCCL_MSCCLPP_ENABLE` is set to 1 but `ENABLE_MSCCLPP` is not defined. (#1294)
* Include mscclpp as a git submodule (#1314)
* Added the desired mscclpp commit as a git submodule.
* Added step to automatically checkout the mscclpp submodule if it isn't already present, in case the user forgot to clone recursively.
* Added instruction to README to clone using --recurse-submodules to get the mscclpp submodule.
* Enabled MSCCL++ feature build.
---------
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
Co-authored-by: Nilesh M Negi <Nilesh.Negi@amd.com>
[ROCm/rccl commit: 736a705875]
此提交包含在:
@@ -396,7 +396,7 @@ struct ncclComm {
|
||||
#if defined(ENABLE_MSCCLPP)
|
||||
// Whether this comm is compatible with MSCCLPP
|
||||
bool mscclppCompatible;
|
||||
struct mscclpp_ncclComm* mscclpp_comm;
|
||||
struct mscclppComm* mscclpp_comm;
|
||||
size_t mscclpp_threshold;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,32 +9,36 @@
|
||||
|
||||
#include "nccl.h"
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
typedef struct mscclpp_ncclComm* mscclpp_ncclComm_t;
|
||||
typedef struct mscclppComm* mscclppComm_t;
|
||||
|
||||
typedef struct { char internal[NCCL_UNIQUE_ID_BYTES]; } mscclpp_ncclUniqueId;
|
||||
typedef ncclUniqueId mscclppUniqueId;
|
||||
|
||||
bool mscclpp_init();
|
||||
/* A ncclUniqueId and a mscclppUniqueId will always be created together and used alternatively. This maps between them. */
|
||||
extern std::unordered_map<ncclUniqueId, mscclppUniqueId> mscclpp_uniqueIdMap;
|
||||
extern std::unordered_map<mscclppUniqueId, std::unordered_set<ncclUniqueId>> mscclpp_uniqueIdReverseMap;
|
||||
extern std::unordered_map<mscclppComm_t, mscclppUniqueId> mscclpp_commToUniqueIdMap;
|
||||
extern std::unordered_map<ncclComm_t, ncclUniqueId> ncclCommToUniqueIdMap;
|
||||
|
||||
/* A ncclUniqueId and a mscclpp_ncclUniqueId will always be created together and used alternatively. This maps between them. */
|
||||
extern std::unordered_map<ncclUniqueId, mscclpp_ncclUniqueId> mscclpp_uniqueIdMap;
|
||||
extern "C" {
|
||||
/* See ncclGetUniqueId. */
|
||||
ncclResult_t mscclpp_ncclGetUniqueId(mscclppUniqueId* uniqueId);
|
||||
|
||||
/* See ncclGetUniqueId. */
|
||||
extern ncclResult_t (*mscclpp_ncclGetUniqueId)(mscclpp_ncclUniqueId* uniqueId);
|
||||
/* See ncclCommInitRank. */
|
||||
ncclResult_t mscclpp_ncclCommInitRank(mscclppComm_t* comm, int nranks, mscclppUniqueId commId, int rank);
|
||||
|
||||
/* See ncclCommInitRank. */
|
||||
extern ncclResult_t (*mscclpp_ncclCommInitRank)(mscclpp_ncclComm_t* comm, int nranks, mscclpp_ncclUniqueId commId, int rank);
|
||||
/* See ncclCommDestroy. */
|
||||
ncclResult_t mscclpp_ncclCommDestroy(mscclppComm_t comm);
|
||||
|
||||
/* See ncclCommDestroy. */
|
||||
extern ncclResult_t (*mscclpp_ncclCommDestroy)(mscclpp_ncclComm_t comm);
|
||||
/* See ncclAllReduce. */
|
||||
ncclResult_t mscclpp_ncclAllReduce(const void* sendbuff, void* recvbuff, size_t count,
|
||||
ncclDataType_t datatype, ncclRedOp_t op, mscclppComm_t comm, hipStream_t stream);
|
||||
|
||||
/* See ncclAllReduce. */
|
||||
extern ncclResult_t (*mscclpp_ncclAllReduce)(const void* sendbuff, void* recvbuff, size_t count,
|
||||
ncclDataType_t datatype, ncclRedOp_t op, mscclpp_ncclComm_t comm, hipStream_t stream);
|
||||
|
||||
/* See ncclAllGather. */
|
||||
extern ncclResult_t (*mscclpp_ncclAllGather)(const void* sendbuff, void* recvbuff, size_t sendcount,
|
||||
ncclDataType_t datatype, mscclpp_ncclComm_t comm, hipStream_t stream);
|
||||
/* See ncclAllGather. */
|
||||
ncclResult_t mscclpp_ncclAllGather(const void* sendbuff, void* recvbuff, size_t sendcount,
|
||||
ncclDataType_t datatype, mscclppComm_t comm, hipStream_t stream);
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
|
||||
新增問題並參考
封鎖使用者