Add proxyTrace (#1732)
This feature tracks the proxy events and status of each send/recv op. ProxyTrace keeps a fixed number of active ops in host mem and dumps the status of each op when the program crashes or hangs.
This commit is contained in:
+11
-1
@@ -139,11 +139,16 @@ static inline int ncclFuncTrafficPerByte(ncclFunc_t func, int nRanks) {
|
||||
}
|
||||
}
|
||||
|
||||
RCCL_PARAM_DECLARE(EnableProxyTrace);
|
||||
/*****************************************************************************/
|
||||
/* Launch system : synchronization and CUDA kernel launch */
|
||||
/*****************************************************************************/
|
||||
static ncclResult_t addProxyOpIfNeeded(struct ncclComm* comm, struct ncclKernelPlan* plan, struct ncclProxyOp* op) {
|
||||
bool needed = true;
|
||||
if (rcclParamEnableProxyTrace()) {
|
||||
op->traceKey.commHash = comm->commHash;
|
||||
op->traceKey.opCount = comm->opCount;
|
||||
}
|
||||
NCCLCHECK(ncclProxySaveOp(comm, op, &needed));
|
||||
if (needed) {
|
||||
struct ncclProxyOp* q = ncclMemoryPoolAlloc<struct ncclProxyOp>(&comm->memPool_ncclProxyOp, &comm->memPermanent);
|
||||
@@ -1030,6 +1035,9 @@ static ncclResult_t addP2pToPlan(
|
||||
op->rank = comm->rank;
|
||||
op->eActivationMask = p2pTasks[dir] ? p2pTasks[dir]->eActivationMask : 0;
|
||||
op->connIndex = connIndex[dir];
|
||||
if (rcclParamEnableProxyTrace()) {
|
||||
op->coll = dir ? ncclFuncSend : ncclFuncRecv;
|
||||
}
|
||||
// The following are modified per channel part in addWorkToChannels():
|
||||
// op->buffer, op->nbytes, op->nsteps = ...;
|
||||
}
|
||||
@@ -1052,7 +1060,9 @@ static ncclResult_t addP2pToPlan(
|
||||
int nParts = dir ? work->nSendChannels : work->nRecvChannels;
|
||||
void* addr = dir ? work->sendAddr : work->recvAddr;
|
||||
size_t bytes = dir ? work->sendBytes : work->recvBytes;
|
||||
|
||||
if (rcclParamEnableProxyTrace()) {
|
||||
proxyOps[dir].totalBytes = bytes;
|
||||
}
|
||||
proxyOps[dir].recvbuff = nullptr;
|
||||
if (nParts <= part) {
|
||||
proxyOps[dir].nsteps = 0;
|
||||
|
||||
Reference in New Issue
Block a user