2
0

Added Unit test for nccl send recv (#506)

Added Send Receive test that tests through all pairs
Este cometimento está contido em:
akolliasAMD
2022-03-02 15:50:16 -05:00
cometido por GitHub
ascendente 29ad0f5fbe
cometimento ff54e79799
8 ficheiros modificados com 135 adições e 9 eliminações
+17 -3
Ver ficheiro
@@ -220,21 +220,35 @@ namespace RcclUnitTesting
}
}
void TestBed::ExecuteCollectives()
void TestBed::ExecuteCollectives(std::vector<int> const &currentRanks)
{
int const cmd = TestBedChild::CHILD_EXECUTE_COLL;
++TestBed::NumTestsRun();
std::vector<std::vector<int>> ranksPerChild(this->numActiveChildren);
for (int rank = 0; rank < currentRanks.size(); ++rank)
{
ranksPerChild[rankToChildMap[currentRanks[rank]]].push_back(rank);
}
// Send ExecuteColl command to each active child process
for (int childId = 0; childId < this->numActiveChildren; ++childId)
{
PIPE_WRITE(childId, cmd);
if ((currentRanks.size() == 0) || (ranksPerChild[childId].size() > 0))
{
PIPE_WRITE(childId, cmd);
int tempCurrentRanks = currentRanks.size();
PIPE_WRITE(childId, tempCurrentRanks);
for (int rank = 0; rank < currentRanks.size(); ++rank){
PIPE_WRITE(childId, currentRanks[rank]);
}
}
}
// Wait for child acknowledgement
for (int childId = 0; childId < this->numActiveChildren; ++childId)
{
PIPE_CHECK(childId);
if ((currentRanks.size() == 0) || (ranksPerChild[childId].size() > 0)) PIPE_CHECK(childId);
}
}