Fix --root all issue. (#83)
Signed-off-by: rahulvaidya20 <ravaidya@amd.com>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
073d56f6e2
commit
c5cae38bb8
+2
-2
@@ -1019,7 +1019,7 @@ int main(int argc, char* argv[]) {
|
||||
nccltype = ncclstringtotype(optarg);
|
||||
break;
|
||||
case 'r':
|
||||
ncclroot = strtol(optarg, NULL, 0);
|
||||
ncclroot = ncclstringtoroot(optarg);
|
||||
break;
|
||||
case 'z':
|
||||
blocking_coll = strtol(optarg, NULL, 0);
|
||||
@@ -1099,7 +1099,7 @@ int main(int argc, char* argv[]) {
|
||||
"[-o,--op <sum/prod/min/max/all>] \n\t"
|
||||
#endif
|
||||
"[-d,--datatype <nccltype/all>] \n\t"
|
||||
"[-r,--root <root>] \n\t"
|
||||
"[-r,--root <root/all>] \n\t"
|
||||
"[-z,--blocking <0/1>] \n\t"
|
||||
"[-Y,--memory_type <coarse/fine/host/managed>] \n\t"
|
||||
"[-s,--stress_cycles <number of cycles>] \n\t"
|
||||
|
||||
@@ -294,6 +294,13 @@ static int ncclstringtoop (char *str) {
|
||||
return ncclSum;
|
||||
}
|
||||
|
||||
static int ncclstringtoroot (char *str) {
|
||||
if (strcmp(str, "all") == 0) {
|
||||
return -1;
|
||||
}
|
||||
return strtol(str, NULL, 0);
|
||||
}
|
||||
|
||||
static int ncclstringtomtype (char *str) {
|
||||
for (int o=0; o<nccl_NUM_MTYPES; o++) {
|
||||
if (strcmp(str, test_memorytypes[o]) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user