MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Init

Method Init

tensorflow/contrib/verbs/verbs_server_lib.cc:81–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81Status VerbsServer::Init(ServiceInitFunction service_func,
82 RendezvousMgrCreationFunction rendezvous_mgr_func) {
83 std::call_once(reg_mem_visitors_call, []() { RdmaMgr::RegMemVisitors(); });
84 GrpcServerOptions opts;
85 opts.service_func = service_func;
86 opts.rendezvous_mgr_func = rendezvous_mgr_func;
87 Status s = GrpcServer::Init(opts);
88 {
89 mutex_lock l(mu_);
90 CHECK_EQ(verbs_state_, DISCONNECTED);
91 CHECK(ChannelCacheFactory(server_def(), &channel_cache_).ok());
92 rdma_mgr_ = new RdmaMgr(worker_env(), channel_cache_);
93 // set rdma_mgr for verbs_service and rdma_rendezvous_mgr
94 verbs_service_->SetRdmaMgr(rdma_mgr_);
95 dynamic_cast<RdmaRendezvousMgr*>(worker_env()->rendezvous_mgr)
96 ->SetRdmaMgr(rdma_mgr_);
97 }
98 return s;
99}
100
101Status VerbsServer::Start() {
102 Status s = GrpcServer::Start();

Callers 1

CreateMethod · 0.45

Calls 3

InitFunction · 0.50
okMethod · 0.45
SetRdmaMgrMethod · 0.45

Tested by

no test coverage detected