Fix MSCCLPP seg-fault when RCCL_MSCCL_ENABLE_SINGLE_PROCESS is enabled (#1338)
Removing unnecessary changes.
rename unique hosts function
Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>
use updated function name
Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>
Missed one instance of `mscclIsMultithreadedComm`.
rename unique hosts function
Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>
use updated function name
Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>
Missed one instance of `mscclIsMultithreadedComm`.
[ROCm/rccl commit: 2fe1e9f7db]
Tá an tiomantas seo le fáil i:
tiomanta ag
nileshnegi
tuismitheoir
d4094525c8
tiomantas
13f6bbde57
@@ -63,12 +63,7 @@ bool mscclAvailable(int rank) {
|
||||
return mscclEnabled() && mscclInitialized(rank);
|
||||
}
|
||||
|
||||
static bool mscclCommCompatible(ncclComm_t comm) {
|
||||
if (rcclParamMscclEnableSingleProcess()) {
|
||||
// Single process usage enabled. No need to guard against multi-thread.
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool allProcessHostsUnique(ncclComm_t comm) {
|
||||
std::map<uint64_t, std::set<uint64_t>> hostHashToPidHashes;
|
||||
for (int i = 0; i < comm->nRanks; i++) {
|
||||
uint64_t hostHash = comm->peerInfo[i].hostHash;
|
||||
@@ -84,9 +79,17 @@ static bool mscclCommCompatible(ncclComm_t comm) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MSCCLPP
|
||||
static bool mscclCommCompatible(ncclComm_t comm) {
|
||||
if (rcclParamMscclEnableSingleProcess()) {
|
||||
// Single process usage enabled. No need to guard against multi-thread.
|
||||
return true;
|
||||
}
|
||||
return allProcessHostsUnique(comm);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MSCCLPP
|
||||
bool mscclppCommCompatible(ncclComm_t comm) {
|
||||
return mscclCommCompatible(comm);
|
||||
return allProcessHostsUnique(comm);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir