Added Unit test for nccl send recv (#506)
Added Send Receive test that tests through all pairs
Este cometimento está contido em:
cometido por
GitHub
ascendente
29ad0f5fbe
cometimento
ff54e79799
@@ -220,21 +220,35 @@ namespace RcclUnitTesting
|
||||
}
|
||||
}
|
||||
|
||||
void TestBed::ExecuteCollectives()
|
||||
void TestBed::ExecuteCollectives(std::vector<int> const ¤tRanks)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador