Fixed unit-test env var list parsing and improved filtered test run speed (#1626)
* Fixed parsing of env var lists which were overwriting the mutable env var string and polluting future parses. * Fixed all tests to obey UT_DATATYPES and UT_REDOPS filters. * Allow tests to bail early via `GTEST_SKIP` if UT_DATATYPES or UT_REDOPS filters give a test size of zero. This allows tests to run much faster with filters on. * Wrapped the support checks in helper functions on `TestBed`.
This commit is contained in:
کامیت شده توسط
GitHub
والد
6af9087b0c
کامیت
18e9ad913b
@@ -12,12 +12,19 @@ namespace RcclUnitTesting
|
||||
TestBed testBed;
|
||||
|
||||
// Configuration
|
||||
std::vector<ncclDataType_t> const& dataTypes = {ncclInt32, ncclFloat16, ncclFloat64};
|
||||
std::vector<ncclDataType_t> const& testDataTypes = {ncclInt32, ncclFloat16, ncclFloat64};
|
||||
std::vector<int> const numElements = {1048576, 53327, 1024, 0};
|
||||
bool const inPlace = false;
|
||||
bool const useManagedMem = false;
|
||||
|
||||
OptionalColArgs options;
|
||||
|
||||
std::vector<ncclDataType_t> dataTypes;
|
||||
testBed.GetSupportedDataTypes(dataTypes, testDataTypes);
|
||||
if (dataTypes.empty()) {
|
||||
GTEST_SKIP() << "Skipping... test datatypes excluded by UT_DATATYPES.";
|
||||
}
|
||||
|
||||
bool isCorrect = true;
|
||||
int numGpus = testBed.ev.maxGpus;
|
||||
for (int rpg=0; rpg < 2 && isCorrect; ++rpg)
|
||||
@@ -104,13 +111,20 @@ namespace RcclUnitTesting
|
||||
TestBed testBed;
|
||||
|
||||
// Configuration
|
||||
std::vector<ncclDataType_t> const& dataTypes = {ncclInt32, ncclFloat16, ncclFloat64};
|
||||
std::vector<ncclDataType_t> const& testDataTypes = {ncclInt32, ncclFloat16, ncclFloat64};
|
||||
std::vector<int> const numElements = {1048576, 53327, 1024};
|
||||
bool const inPlace = false;
|
||||
bool const useManagedMem = false;
|
||||
bool const userRegistered = true;
|
||||
|
||||
OptionalColArgs options;
|
||||
|
||||
std::vector<ncclDataType_t> dataTypes;
|
||||
testBed.GetSupportedDataTypes(dataTypes, testDataTypes);
|
||||
if (dataTypes.empty()) {
|
||||
GTEST_SKIP() << "Skipping... test datatypes excluded by UT_DATATYPES.";
|
||||
}
|
||||
|
||||
bool isCorrect = true;
|
||||
int numGpus = testBed.ev.maxGpus;
|
||||
for (int rpg=0; rpg < 2 && isCorrect; ++rpg)
|
||||
|
||||
مرجع در شماره جدید
Block a user