There is no backpropagation for send and recv. You can use the RPC Framework: Distributed RPC Framework — PyTorch 1.9.0 documentation 1 and that will allow you to backpropagate across RPC calls.
Alternatively, you could do this yourself via autograd functions, ex: pytorch/functional.py at master · pytorch/pytorch · GitHub. You can find docs for autograd functions here: Automatic differentiation package - torch.autograd — PyTorch 1.9.0 documentation