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

Method Create

tensorflow/core/distributed_runtime/rpc/grpc_session.cc:45–64  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

43
44/* static */
45Status GrpcSession::Create(const SessionOptions& options,
46 std::unique_ptr<GrpcSession>* out_session) {
47 std::unique_ptr<GrpcSession> session(new GrpcSession(options));
48 std::unique_ptr<MasterInterface> master;
49 // For testing, we enable the client to disable the use of the local
50 // master registry, so that the RPC stack is exercised.
51 if (!options.config.rpc_options().use_rpc_for_inprocess_master()) {
52 master = LocalMaster::Lookup(options.target);
53 }
54 if (!master) {
55 SharedGrpcChannelPtr master_channel;
56 TF_RETURN_IF_ERROR(
57 NewHostPortGrpcChannel(options.target.substr(kSchemePrefixLength),
58 &options.config.rpc_options(), &master_channel));
59 master.reset(NewGrpcMaster(master_channel));
60 }
61 session->SetRemoteMaster(std::move(master));
62 *out_session = std::move(session);
63 return Status::OK();
64}
65
66namespace {
67// Re-encodes constant represented in tensor proto into

Callers 3

TESTFunction · 0.45
FindMaxEigenFunction · 0.45
CreateInvalidGraphFunction · 0.45

Calls 7

NewHostPortGrpcChannelFunction · 0.85
NewGrpcMasterFunction · 0.85
SetRemoteMasterMethod · 0.80
SetTimeoutMethod · 0.80
CreateFunction · 0.50
GraphDefClass · 0.50
resetMethod · 0.45

Tested by 3

TESTFunction · 0.36
FindMaxEigenFunction · 0.36
CreateInvalidGraphFunction · 0.36