Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/single/reduce_test.cu')
-rw-r--r--test/single/reduce_test.cu20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/single/reduce_test.cu b/test/single/reduce_test.cu
index dbe99c0..aa0d20f 100644
--- a/test/single/reduce_test.cu
+++ b/test/single/reduce_test.cu
@@ -15,6 +15,9 @@
#include <nvToolsExt.h>
int csv = false;
+int errors = 0;
+double min_bw = 10000.0;
+bool is_reduction = true;
template<typename T>
void RunTest(T** sendbuff, T** recvbuff, const int N, const ncclDataType_t type,
@@ -94,6 +97,9 @@ void RunTest(T** sendbuff, T** recvbuff, const int N, const ncclDataType_t type,
printf((csv)?"%f,%f,%f,%le,":" %7.3f %5.2f %5.2f %7.0le",
elapsedSec * 1.0E3, algbw, busbw, maxDelta);
+ if (maxDelta > deltaMaxValue(type, is_reduction)) errors++;
+ if (busbw < min_bw) min_bw = busbw;
+
nvtxRangePop();
}
@@ -133,6 +139,9 @@ void RunTest(T** sendbuff, T** recvbuff, const int N, const ncclDataType_t type,
printf((csv)?"%f,%f,%f,%le,":" %7.3f %5.2f %5.2f %7.0le\n",
elapsedSec * 1.0E3, algbw, busbw, maxDelta);
+ if (maxDelta > deltaMaxValue(type, is_reduction)) errors++;
+ if (busbw < min_bw) min_bw = busbw;
+
nvtxRangePop();
}
@@ -272,6 +281,15 @@ int main(int argc, char* argv[]) {
ncclCommDestroy(comms[i]);
free(comms);
- exit(EXIT_SUCCESS);
+ char* str = getenv("NCCL_TESTS_MIN_BW");
+ double check_min_bw = str ? atof(str) : -1;
+
+ printf(" Out of bounds values : %d %s\n", errors, errors ? "FAILED" : "OK");
+ printf(" Min bus bandwidth : %g %s\n", min_bw, check_min_bw == -1 ? "" : (min_bw < check_min_bw ? "FAILED" : "OK"));
+ printf("\n");
+ if (errors || min_bw < check_min_bw)
+ exit(EXIT_FAILURE);
+ else
+ exit(EXIT_SUCCESS);
}