@@ -69,6 +69,7 @@ static int datacheck = 1;
|
|||||||
static int warmup_iters = 5;
|
static int warmup_iters = 5;
|
||||||
static int iters = 20;
|
static int iters = 20;
|
||||||
static int agg_iters = 1;
|
static int agg_iters = 1;
|
||||||
|
static int run_cycles = 1;
|
||||||
static int ncclop = ncclSum;
|
static int ncclop = ncclSum;
|
||||||
static int nccltype = ncclFloat;
|
static int nccltype = ncclFloat;
|
||||||
static int ncclroot = 0;
|
static int ncclroot = 0;
|
||||||
@@ -598,7 +599,9 @@ testResult_t TimeTest(struct threadArgs* args, ncclDataType_t type, const char*
|
|||||||
TESTCHECK(completeColl(args));
|
TESTCHECK(completeColl(args));
|
||||||
|
|
||||||
// Benchmark
|
// Benchmark
|
||||||
for (size_t size = args->minbytes; size<=args->maxbytes; size = ((args->stepfactor > 1) ? size*args->stepfactor : size+args->stepbytes)) {
|
long repeat = run_cycles;
|
||||||
|
do {
|
||||||
|
for (size_t size = args->minbytes; size<=args->maxbytes; size = ((args->stepfactor > 1) ? size*args->stepfactor : size+args->stepbytes)) {
|
||||||
setupArgs(size, type, args);
|
setupArgs(size, type, args);
|
||||||
char rootName[100];
|
char rootName[100];
|
||||||
sprintf(rootName, "%6i", root);
|
sprintf(rootName, "%6i", root);
|
||||||
@@ -606,7 +609,9 @@ testResult_t TimeTest(struct threadArgs* args, ncclDataType_t type, const char*
|
|||||||
TESTCHECK(BenchTime(args, type, op, root, 0));
|
TESTCHECK(BenchTime(args, type, op, root, 0));
|
||||||
TESTCHECK(BenchTime(args, type, op, root, 1));
|
TESTCHECK(BenchTime(args, type, op, root, 1));
|
||||||
PRINT("\n");
|
PRINT("\n");
|
||||||
}
|
}
|
||||||
|
} while (--repeat);
|
||||||
|
|
||||||
return testSuccess;
|
return testSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -717,6 +722,7 @@ int main(int argc, char* argv[]) {
|
|||||||
{"iters", required_argument, 0, 'n'},
|
{"iters", required_argument, 0, 'n'},
|
||||||
{"agg_iters", required_argument, 0, 'm'},
|
{"agg_iters", required_argument, 0, 'm'},
|
||||||
{"warmup_iters", required_argument, 0, 'w'},
|
{"warmup_iters", required_argument, 0, 'w'},
|
||||||
|
{"run_cycles", required_argument, 0, 'N'},
|
||||||
{"parallel_init", required_argument, 0, 'p'},
|
{"parallel_init", required_argument, 0, 'p'},
|
||||||
{"check", required_argument, 0, 'c'},
|
{"check", required_argument, 0, 'c'},
|
||||||
{"op", required_argument, 0, 'o'},
|
{"op", required_argument, 0, 'o'},
|
||||||
@@ -735,7 +741,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
int c;
|
int c;
|
||||||
c = getopt_long(argc, argv, "t:g:b:e:i:f:n:m:w:p:c:o:d:r:z:y:T:hG:C:a:R:", longopts, &longindex);
|
c = getopt_long(argc, argv, "t:g:b:e:i:f:n:m:w:N:p:c:o:d:r:z:y:T:hG:C:a:R:", longopts, &longindex);
|
||||||
|
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
@@ -782,6 +788,9 @@ int main(int argc, char* argv[]) {
|
|||||||
case 'w':
|
case 'w':
|
||||||
warmup_iters = (int)strtol(optarg, NULL, 0);
|
warmup_iters = (int)strtol(optarg, NULL, 0);
|
||||||
break;
|
break;
|
||||||
|
case 'N':
|
||||||
|
run_cycles = (int)strtol(optarg, NULL, 0);
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
datacheck = (int)strtol(optarg, NULL, 0);
|
datacheck = (int)strtol(optarg, NULL, 0);
|
||||||
break;
|
break;
|
||||||
@@ -841,6 +850,7 @@ int main(int argc, char* argv[]) {
|
|||||||
"[-n,--iters <iteration count>] \n\t"
|
"[-n,--iters <iteration count>] \n\t"
|
||||||
"[-m,--agg_iters <aggregated iteration count>] \n\t"
|
"[-m,--agg_iters <aggregated iteration count>] \n\t"
|
||||||
"[-w,--warmup_iters <warmup iteration count>] \n\t"
|
"[-w,--warmup_iters <warmup iteration count>] \n\t"
|
||||||
|
"[-N,--run_cycles <cycle count> run & print each cycle (default: 1; 0=infinite)] \n\t"
|
||||||
"[-p,--parallel_init <0/1>] \n\t"
|
"[-p,--parallel_init <0/1>] \n\t"
|
||||||
"[-c,--check <check iteration count>] \n\t"
|
"[-c,--check <check iteration count>] \n\t"
|
||||||
#if NCCL_VERSION_CODE >= NCCL_VERSION(2,11,0)
|
#if NCCL_VERSION_CODE >= NCCL_VERSION(2,11,0)
|
||||||
|
|||||||
Reference in New Issue
Block a user