Unit Tests for testing channels (#1222)

This commit is contained in:
saurabhAMD
2024-06-25 10:10:10 -05:00
gecommit door GitHub
bovenliggende 5f2b88bc28
commit e170f41ddd
5 gewijzigde bestanden met toevoegingen van 53 en 38 verwijderingen
+21 -18
Bestand weergeven
@@ -89,24 +89,27 @@ namespace RcclUnitTesting
TEST(AllToAll, Channels)
{
TestBed testBed;
if(testBed.ev.isGfx94) {
// Configuration
std::vector<ncclFunc_t> const funcTypes = {ncclCollAllToAll};
std::vector<ncclDataType_t> const dataTypes = {ncclBfloat16, ncclHalf};
std::vector<ncclRedOp_t> const redOps = {ncclSum};
std::vector<int> const roots = {0};
std::vector<int> const numElements = {64 * 1024 * 1024, 1024};
std::vector<bool> const inPlaceList = {false};
std::vector<bool> const managedMemList = {false};
std::vector<bool> const useHipGraphList = {false, true};
std::vector<char *> const channelList = {"56", "84", "112"};
for (auto channel : channelList) {
setenv("NCCL_MIN_NCHANNELS", channel, 1);
testBed.RunSimpleSweep(funcTypes, dataTypes, redOps, roots, numElements,
inPlaceList, managedMemList, useHipGraphList);
testBed.Finalize();
unsetenv("NCCL_MIN_NCHANNELS");
if(testBed.ev.maxGpus >= 8) {
if(testBed.ev.isGfx94) {
// Configuration
std::vector<ncclFunc_t> const funcTypes = {ncclCollAllToAll};
std::vector<ncclDataType_t> const dataTypes = {ncclBfloat16};
std::vector<ncclRedOp_t> const redOps = {ncclSum};
std::vector<int> const roots = {0};
std::vector<int> const numElements = {64 * 1024 * 1024, 1024};
std::vector<bool> const inPlaceList = {false};
std::vector<bool> const managedMemList = {false};
std::vector<bool> const useHipGraphList = {false, true};
std::vector<char *> const channelList = {"112"};
bool const enableSweep = false;
for (auto channel : channelList) {
setenv("NCCL_MIN_NCHANNELS", channel, 1);
testBed.RunSimpleSweep(funcTypes, dataTypes, redOps, roots, numElements,
inPlaceList, managedMemList, useHipGraphList, enableSweep);
testBed.Finalize();
unsetenv("NCCL_MIN_NCHANNELS");
}
}
}
}
}
}