with torch.distributed.autograd.context():
      res = remote_emb(data)
      loss = ddp_model(res)
      torch.distributed.autograd.backward([loss])
```

DDP+RPC Tutorial (Link)
Documentation (Link)
Usage Examples (Link)

[Beta] RPC - Asynchronous User Functions