Esempio n. 1
0
 def test_register_rpc_backend_and_init_rpc_backend(
         self, mock_init_rref_context, mock_dist_autograd_init):
     backend_name = "stub_backend"
     rpc.register_backend(backend_name, stub_init_rpc_backend_handler)
     rpc.init_model_parallel(self_name="worker1",
                             backend=backend_name,
                             self_rank=1)
Esempio n. 2
0
 def test_register_rpc_backend_and_start_rpc_backend(
         self, mock_rpc_agent, mock_dist_autograd_init):
     backend_name = "stub_backend"
     rpc.register_backend(backend_name, stub_start_rpc_backend_handler)
     rpc.init_model_parallel(
         self_name="worker1",
         backend=backend_name,
         init_method=self.init_method,
         self_rank=self.rank,
         worker_name_to_id=self.worker_name_to_id,
     )