Prevent WR index truncation in the InfiniBand transport plugin

This commit is contained in:
Dmitrii Gabor 2023-06-22 13:42:33 +03:00 committed by Sylvain Jeaugey
parent ea38312273
commit 6e24ef4e1f

View File

@ -1064,7 +1064,7 @@ ncclResult_t ncclIbIsend(void* sendComm, void* data, int size, int tag, void* mh
int slot = (comm->fifoHead)%MAX_REQUESTS; int slot = (comm->fifoHead)%MAX_REQUESTS;
struct ncclIbRequest** reqs = comm->fifoReqs[slot]; struct ncclIbRequest** reqs = comm->fifoReqs[slot];
slots = comm->fifo[slot]; slots = comm->fifo[slot];
int idx = comm->fifoHead+1; uint64_t idx = comm->fifoHead+1;
if (slots[0].idx != idx) { *request = NULL; return ncclSuccess; } if (slots[0].idx != idx) { *request = NULL; return ncclSuccess; }
nreqs = slots[0].nreqs; nreqs = slots[0].nreqs;
// Wait until all data has arrived // Wait until all data has arrived