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`.
Cette révision appartient à :
corey-derochie-amd
2025-12-10 10:06:44 -07:00
révisé par GitHub
Parent 6af9087b0c
révision 18e9ad913b
6 fichiers modifiés avec 126 ajouts et 38 suppressions
+14 -2
Voir le fichier
@@ -79,13 +79,19 @@ namespace RcclUnitTesting
TestBed testBed;
// Configuration
std::vector<ncclDataType_t> const& dataTypes = {ncclInt32, ncclFloat64, ncclFloat16};
std::vector<ncclDataType_t> const& testDataTypes = {ncclInt32, ncclFloat64, ncclFloat16};
bool const inPlace = false;
bool const useManagedMem = false;
bool const useHipGraph = 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;
for (int totalRanks : testBed.ev.GetNumGpusList())
for (int isMultiProcess : testBed.ev.GetIsMultiProcessList())
@@ -137,13 +143,19 @@ namespace RcclUnitTesting
TestBed testBed;
// Configuration
std::vector<ncclDataType_t> const& dataTypes = {ncclFloat32, ncclInt8};
std::vector<ncclDataType_t> const& testDataTypes = {ncclFloat32, ncclInt8};
bool const inPlace = false;
bool const useManagedMem = false;
bool const useHipGraph = 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;
for (int totalRanks : testBed.ev.GetNumGpusList())
for (int isMultiProcess : testBed.ev.GetIsMultiProcessList())