


import torch.distributed.rpc as rpc
      >>> rpc.init_rpc("worker0", rank=0, world_size=2)
      >>> fut = rpc.rpc_async("worker1", my_script_add, args=(torch.ones(2), 3))
      >>> ret = fut.wait()
      >>> rpc.shutdown()



  >>> # On worker 1:
  >>> import torch.distributed.rpc as rpc
  >>> rpc.init_rpc("worker1", rank=1, world_size=2)
  >>> rpc.shutdown()

torch.distributed.rpc.remote(to, func, args=None, kwargs=None, timeout=- 1.0)
Make a remote call to run "func" on worker "to" and return an
   "RRef" to the result value immediately. Worker "to" will be the
   owner of the returned "RRef", and the worker calling "remote" is a
   user. The owner manages the global reference count of its "RRef",
   and the owner "RRef" is only destructed when globally there are no
   living references to it.
Parameters:
      * to (str or WorkerInfo or int) --
        name/rank/"WorkerInfo" of the destination worker.