in dualpipe/dualpipev.py [0:0]
def _recv_backward(self, phase: int) -> None:
if self.forward_only:
return
if (self.is_first_rank and phase == 1) or (self.is_last_rank and phase == 0):
return
self.current_recv_b_chunk_id[phase] += 1
tensors = comm.append_irecv(self.comm_ops, self.next_rank if phase == 0 else self.prev_rank, self.group)
self.output_grad_chunks[phase].append(tensors)