Add fault injection of starting warps with random variations (#1593)

* Add fault injection of starting warps with random variations

This is done by inserting randomly delays after __syncthreads().
The feature can be turned off by FAULT_INJECTION=OFF in cmake.

* Remove manually introduced bug for demo purpose

* Use only one thread per warp for checking wall clock

[ROCm/rccl commit: 90ad586d94]
This commit is contained in:
Wenkai Du
2025-03-20 16:11:43 -07:00
committad av GitHub
förälder 12c1fe8fdf
incheckning e86b217182
6 ändrade filer med 126 tillägg och 20 borttagningar
+12 -2
Visa fil
@@ -433,7 +433,8 @@ struct ncclCollTrace {
uint8_t type;
uint8_t bid;
int16_t funcIndex;
uint32_t data_0:24;
uint16_t data_0;
uint8_t batchIx;
uint8_t tid;
uint8_t channelId;
uint64_t timeStamp:56;
@@ -452,7 +453,6 @@ struct ncclCollTrace {
struct {
uint8_t sendRank;
uint8_t recvRank;
uint8_t nP2pChannels;
uint8_t nSendChannels;
uint8_t nRecvChannels;
uint8_t channelBase;
@@ -460,6 +460,8 @@ struct ncclCollTrace {
uint8_t recvConnIndex:2;
uint8_t sendProtoLL:1;
uint8_t recvProtoLL:1;
uint8_t sendRegistered:1;
uint8_t recvRegistered:1;
} p2p;
};
};
@@ -518,8 +520,16 @@ struct ncclDevComm {
#ifdef ENABLE_PROFILING
struct ncclProf* devProf;
#endif
#ifdef ENABLE_FAULT_INJECTION
uint64_t faults;
#endif
};
#ifdef ENABLE_FAULT_INJECTION
#define RANDOM_DELAY_ON_WARP_START 0x1L
#endif
struct alignas(16) ncclDevCommAndChannels {
struct ncclDevComm comm;
struct ncclDevChannel channels[MAXCHANNELS];