transport on its own, with no intervention required.
Example:



import os
from torch.distributed import rpc
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '29500'
rpc.init_rpc(
    "worker1",
    rank=0,
    world_size=2,
    rpc_backend_options=rpc.TensorPipeRpcBackendOptions(
        num_worker_threads=8,
        rpc_timeout=20 # 20 second timeout
    )
)
omitting init_rpc invocation on worker2



class torch.distributed.rpc.TensorPipeRpcBackendOptions(*, num_worker_threads=16, rpc_timeout=60.0, init_method='env://', device_maps=None, devices=None, _transports=None, _channels=None)
The backend options for "TensorPipeAgent", derived from
   "RpcBackendOptions".
Parameters:
      * num_worker_threads (int, optional) -- The number of
        threads in the thread-pool used by "TensorPipeAgent" to
        execute requests (default: 16).