Added Unit test for nccl send recv (#506)
Added Send Receive test that tests through all pairs
[ROCm/rccl commit: ff54e79799]
Tento commit je obsažen v:
@@ -262,7 +262,7 @@ namespace RcclUnitTesting
|
||||
{
|
||||
if (collId == -1 || collId == collIdx)
|
||||
{
|
||||
CollectiveArgs& collArg = this->collArgs[localRank][collIdx];
|
||||
CollectiveArgs& collArg = this->collArgs[localRank][collIdx];
|
||||
CHECK_CALL(collArg.AllocateMem(inPlace, useManagedMem));
|
||||
if (this->verbose) INFO("Rank %d on child %d allocates memory for collective %d on device %d (%s,%s) Input: %p Output %p\n",
|
||||
globalRank, this->childId, collIdx, this->deviceIds[localRank],
|
||||
@@ -315,6 +315,14 @@ namespace RcclUnitTesting
|
||||
|
||||
ErrCode TestBedChild::ExecuteCollectives()
|
||||
{
|
||||
int numRanksToExecute, tempRank;
|
||||
std::vector<int> ranksToExecute = {};
|
||||
PIPE_READ(numRanksToExecute);
|
||||
|
||||
for (int rank = 0; rank < numRanksToExecute; ++rank){
|
||||
PIPE_READ(tempRank);
|
||||
ranksToExecute.push_back(tempRank - this->rankOffset);
|
||||
}
|
||||
if (this->verbose) INFO("Child %d begins ExecuteCollectives()\n", this->childId);
|
||||
|
||||
// Start group call
|
||||
@@ -326,6 +334,9 @@ namespace RcclUnitTesting
|
||||
// Loop over all local ranks
|
||||
for (int localRank = 0; localRank < this->deviceIds.size(); ++localRank)
|
||||
{
|
||||
// If ranks to execute is empty, execute all ranks belonging to child
|
||||
if (!ranksToExecute.empty() && (std::count(ranksToExecute.begin(), ranksToExecute.end(), localRank) == 0)) continue;
|
||||
|
||||
CHECK_HIP(hipSetDevice(this->deviceIds[localRank]));
|
||||
|
||||
CollectiveArgs const& collArg = this->collArgs[localRank][collId];
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele