reqs = torch.distributed.batch_isend_irecv(ops) for req in reqs: req.wait() # Temporary workaround for batch_isend_irecv() race condition. torch.cuda.synchronize() return tensor_recv_prev, tensor_recv_next0 comments on commit 1b3dfa2 Please sign in to comment. ©...
在dist.isend()之后写入tensor将导致不确定的行为。 在dist.irecv()之后从tensor读取将导致不确定的行为。 但是,在执行req.wait()之后,我们可以确保进行了通信,并且tensor[0]中存储的值为 1.0。 当我们希望对流程的通信进行精细控制时,点对点通信非常有用。 它们可用于实现精美的算法,例如百度的 DeepSpeech 或 Fac...