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`.

[ROCm/rccl commit: 18e9ad913b]
This commit is contained in:
corey-derochie-amd
2025-12-10 10:06:44 -07:00
committed by GitHub
szülő 2e0abab81a
commit de82a18790
6 fájl változott, egészen pontosan 126 új sor hozzáadva és 38 régi sor törölve
+16 -2
Fájl megtekintése
@@ -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)