MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / _RemoteRecv

Class _RemoteRecv

imperative/python/megengine/distributed/functional.py:809–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807
808
809class _RemoteRecv(Function):
810 def __init__(self, op: RemoteRecv):
811 self.op = op
812
813 def forward(self, dummy):
814 return apply(self.op, dummy)[0]
815
816 def backward(self, grad):
817 get_client().bcast_val(grad is not None, self.op.key, 2)
818 if grad is not None:
819 remote_send(grad, self.op.rank_from)
820
821
822def remote_send(inp: Tensor, dest_rank: int):

Callers 1

remote_recvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected