


  >>> rpc.init_rpc(
  >>>     "worker0",
  >>>     rank=0,
  >>>     world_size=2,
  >>>     backend=rpc.BackendType.TENSORPIPE,
  >>>     rpc_backend_options=options
  >>> )
  >>>
  >>> x = torch.ones(2)
  >>> rets = rpc.rpc_sync("worker1", add, args=(x.to(0), 1))
  >>> # The first argument will be moved to cuda:1 on worker1. When
  >>> # sending the return value back, it will follow the invert of
  >>> # the device map, and hence will be moved back to cuda:0 and
  >>> # cuda:1 on worker0
  >>> print(rets[0])  # tensor([2., 2.], device='cuda:0')
  >>> print(rets[1])  # tensor([2., 2.], device='cuda:1')




set_devices(devices)
  Set local devices used by the TensorPipe RPC agent. When
  processing CUDA RPC requests, the TensorPipe RPC agent will
  properly synchronize CUDA streams for all devices in this
  "List".

  Parameters:
     **devices** (*List of python:int**, **str**, or
