Fix MSCCL proxy number of chunks calculation (#821)
Current number of transmissions parsed from MSCCL algorithm is 1-based value,
but when calculating proxy number of chunks, it's taken as 0-based value.
This commit fixes this issue.
[ROCm/rccl commit: f7dc7b7e6a]
这个提交包含在:
@@ -658,7 +658,7 @@ ncclResult_t mscclGetAlgoFromXmlFile(const char* str, struct mscclAlgo* algo, in
|
|||||||
|
|
||||||
// finish up mscclChannel calculation
|
// finish up mscclChannel calculation
|
||||||
|
|
||||||
for (int c = 0; c < MSCCL_MAX_COUNT; c++) {
|
for (int c = 1; c <= MSCCL_MAX_COUNT; c++) {
|
||||||
struct mscclChannelPeerInfo* sendPeer = &mscclChannel->sendPeerInfo[mscclChannel->nSendPeers];
|
struct mscclChannelPeerInfo* sendPeer = &mscclChannel->sendPeerInfo[mscclChannel->nSendPeers];
|
||||||
if (sendPeer->nTransmissionsOfCount[c] > 0) {
|
if (sendPeer->nTransmissionsOfCount[c] > 0) {
|
||||||
sendPeer->existingCounts[sendPeer->nExistingCounts] = c;
|
sendPeer->existingCounts[sendPeer->nExistingCounts] = c;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ ncclResult_t mscclSetupProxy(struct mscclAlgo* hostAlgo, ncclComm_t comm) {
|
|||||||
int nRecvs = 0;
|
int nRecvs = 0;
|
||||||
for (int j = 0; j < recvPeer->nExistingCounts; j++){
|
for (int j = 0; j < recvPeer->nExistingCounts; j++){
|
||||||
int c = recvPeer->existingCounts[j];
|
int c = recvPeer->existingCounts[j];
|
||||||
int nStepsInCount = DIVUP(c+1, status.maxAllowedCount);
|
int nStepsInCount = DIVUP(c, status.maxAllowedCount);
|
||||||
nRecvs += recvPeer->nTransmissionsOfCount[c] * nStepsInCount;
|
nRecvs += recvPeer->nTransmissionsOfCount[c] * nStepsInCount;
|
||||||
}
|
}
|
||||||
proxyOp.nsteps = nLoopsChunkSteps * nRecvs;
|
proxyOp.nsteps = nLoopsChunkSteps * nRecvs;
|
||||||
@@ -131,7 +131,7 @@ ncclResult_t mscclSetupProxy(struct mscclAlgo* hostAlgo, ncclComm_t comm) {
|
|||||||
int nSends = 0;
|
int nSends = 0;
|
||||||
for (int j = 0; j < sendPeer->nExistingCounts; j++){
|
for (int j = 0; j < sendPeer->nExistingCounts; j++){
|
||||||
int c = sendPeer->existingCounts[j];
|
int c = sendPeer->existingCounts[j];
|
||||||
int nStepsInCount = DIVUP(c+1, status.maxAllowedCount);
|
int nStepsInCount = DIVUP(c, status.maxAllowedCount);
|
||||||
nSends += sendPeer->nTransmissionsOfCount[c] * nStepsInCount;
|
nSends += sendPeer->nTransmissionsOfCount[c] * nStepsInCount;
|
||||||
}
|
}
|
||||||
proxyOp.nsteps = nLoopsChunkSteps * nSends;
|
proxyOp.nsteps = nLoopsChunkSteps * nSends;
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户