@@ -152,16 +152,17 @@ commResult_t peerPutNonContig(
152152 // Skip sending sendcounts if it is second all2allv.
153153 // TODO: using hints instead of nonContigIndices to determine this.
154154 if (!nonContigIndices) {
155- puts.emplace_back (CtranMapperPutMsg{
156- .sbuf = reinterpret_cast <size_t *>(sendCountsTmpbufGPU),
157- .dbuf = &remoteTmpRecvCountsBufGPU[myRank * sendcountsLength],
158- .len = sizeof (size_t ) * sendcountsLength,
159- .config =
160- CtranMapperConfig{
161- .memHdl_ = sendcountsTmpbufRegHdl,
162- .remoteAccessKey_ = interNodeRemoteTmpAccessKey,
163- .notify_ = false /* notify*/ },
164- .req = nullptr });
155+ puts.emplace_back (
156+ CtranMapperPutMsg{
157+ .sbuf = reinterpret_cast <size_t *>(sendCountsTmpbufGPU),
158+ .dbuf = &remoteTmpRecvCountsBufGPU[myRank * sendcountsLength],
159+ .len = sizeof (size_t ) * sendcountsLength,
160+ .config =
161+ CtranMapperConfig{
162+ .memHdl_ = sendcountsTmpbufRegHdl,
163+ .remoteAccessKey_ = interNodeRemoteTmpAccessKey,
164+ .notify_ = false /* notify*/ },
165+ .req = nullptr });
165166 }
166167
167168 // Handle the corner case that all the metadata and data are not sent.
@@ -187,50 +188,53 @@ commResult_t peerPutNonContig(
187188 // the peer may exist without receiving all the data.
188189 if (i == sendIndicesBlockLengthsTmpbufCPU[peer] - 1 ) {
189190 ibPutReqs.push_back (std::make_unique<CtranMapperRequest>());
190- puts.emplace_back (CtranMapperPutMsg{
191- .sbuf = sendbuffs[curIndex],
192- .dbuf =
193- (void *)(reinterpret_cast <uintptr_t >(remoteRecvBuffs[peer]) +
194- remoteRecvBuffsBytesOffset[curIndex]),
195- .len = totalSendcounts * commTypeSize (datatype),
196- .config =
197- CtranMapperConfig{
198- .memHdl_ = sendMemHdl,
199- .remoteAccessKey_ = remoteAccessKeys[peer],
200- .notify_ = true /* notify*/ },
201- .req = ibPutReqs.back ().get ()});
191+ puts.emplace_back (
192+ CtranMapperPutMsg{
193+ .sbuf = sendbuffs[curIndex],
194+ .dbuf = (void *)(reinterpret_cast <uintptr_t >(
195+ remoteRecvBuffs[peer]) +
196+ remoteRecvBuffsBytesOffset[curIndex]),
197+ .len = totalSendcounts * commTypeSize (datatype),
198+ .config =
199+ CtranMapperConfig{
200+ .memHdl_ = sendMemHdl,
201+ .remoteAccessKey_ = remoteAccessKeys[peer],
202+ .notify_ = true /* notify*/ },
203+ .req = ibPutReqs.back ().get ()});
202204 putNotifiedFlag = true ;
203205 } else {
204206 if (totalSendcounts == 0 ) {
205207 continue ;
206208 }
207- puts.emplace_back (CtranMapperPutMsg{
208- .sbuf = sendbuffs[curIndex],
209- .dbuf =
210- (void *)(reinterpret_cast <uintptr_t >(remoteRecvBuffs[peer]) +
211- remoteRecvBuffsBytesOffset[curIndex]),
212- .len = totalSendcounts * commTypeSize (datatype),
213- .config =
214- CtranMapperConfig{
215- .memHdl_ = sendMemHdl,
216- .remoteAccessKey_ = remoteAccessKeys[peer],
217- .notify_ = false /* notify*/ },
218- .req = nullptr });
209+ puts.emplace_back (
210+ CtranMapperPutMsg{
211+ .sbuf = sendbuffs[curIndex],
212+ .dbuf = (void *)(reinterpret_cast <uintptr_t >(
213+ remoteRecvBuffs[peer]) +
214+ remoteRecvBuffsBytesOffset[curIndex]),
215+ .len = totalSendcounts * commTypeSize (datatype),
216+ .config =
217+ CtranMapperConfig{
218+ .memHdl_ = sendMemHdl,
219+ .remoteAccessKey_ = remoteAccessKeys[peer],
220+ .notify_ = false /* notify*/ },
221+ .req = nullptr });
219222 }
220223 i++;
221224 }
222225
223226 if (!putNotifiedFlag) {
224- puts.emplace_back (CtranMapperPutMsg{
225- .sbuf = reinterpret_cast <size_t *>(sendCountsTmpbufGPU),
226- .dbuf = &remoteTmpRecvCountsBufGPU[myRank * sendcountsLength],
227- .len = 0 ,
228- .config =
229- CtranMapperConfig{
230- .memHdl_ = sendcountsTmpbufRegHdl,
231- .remoteAccessKey_ = interNodeRemoteTmpAccessKey,
232- .notify_ = true /* notify*/ },
233- .req = ibPutReqs.back ().get ()});
227+ puts.emplace_back (
228+ CtranMapperPutMsg{
229+ .sbuf = reinterpret_cast <size_t *>(sendCountsTmpbufGPU),
230+ .dbuf = &remoteTmpRecvCountsBufGPU[myRank * sendcountsLength],
231+ .len = 0 ,
232+ .config =
233+ CtranMapperConfig{
234+ .memHdl_ = sendcountsTmpbufRegHdl,
235+ .remoteAccessKey_ = interNodeRemoteTmpAccessKey,
236+ .notify_ = true /* notify*/ },
237+ .req = ibPutReqs.back ().get ()});
234238 }
235239
236240 FB_COMMCHECK (
0 commit comments