Merge remote-tracking branch 'remotes/nccl/master' into HEAD
[ROCm/rccl commit: 7c38da0939]
This commit is contained in:
@@ -88,10 +88,10 @@ void ncclDebugLog(ncclDebugLogLevel level, unsigned long flags, const char *file
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t getHash(const char* string) {
|
||||
uint64_t getHash(const char* string, int n) {
|
||||
// Based on DJB2, result = result * 33 + char
|
||||
uint64_t result = 5381;
|
||||
for (int c = 0; string[c] != '\0'; c++) {
|
||||
for (int c = 0; c < n; c++) {
|
||||
result = ((result << 5) + result) + string[c];
|
||||
}
|
||||
return result;
|
||||
@@ -130,7 +130,7 @@ uint64_t getHostHash(void) {
|
||||
uname[offset]='\0';
|
||||
TRACE(NCCL_INIT,"unique hostname '%s'", uname);
|
||||
|
||||
return getHash(uname);
|
||||
return getHash(uname, strlen(uname));
|
||||
}
|
||||
|
||||
/* Generate a hash of the unique identifying string for this process
|
||||
@@ -150,7 +150,7 @@ uint64_t getPidHash(void) {
|
||||
pname[plen+len]='\0';
|
||||
TRACE(NCCL_INIT,"unique PID '%s'", pname);
|
||||
|
||||
return getHash(pname);
|
||||
return getHash(pname, strlen(pname));
|
||||
}
|
||||
|
||||
int parseStringList(const char* string, struct netIf* ifList, int maxList) {
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user