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

Method WorkerSession

tensorflow/core/distributed_runtime/worker_session.cc:107–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105} // namespace
106
107WorkerSession::WorkerSession(const string& session_name,
108 const string& worker_name,
109 std::unique_ptr<WorkerCacheInterface> worker_cache,
110 std::unique_ptr<DeviceMgr> device_mgr,
111 std::unique_ptr<GraphMgr> graph_mgr,
112 std::unique_ptr<DeviceMgr> remote_device_mgr)
113 : session_name(session_name),
114 worker_name(worker_name),
115 worker_cache(new WorkerFreeListCache(std::move(worker_cache))),
116 graph_mgr(std::move(graph_mgr)),
117 cluster_flr(new ClusterFunctionLibraryRuntime(
118 this, !session_name.empty(),
119 remote_device_mgr ? remote_device_mgr.get() : nullptr)),
120 device_mgr_(std::move(device_mgr)),
121 borrowed_device_mgr_(nullptr),
122 remote_device_mgr_(std::move(remote_device_mgr)) {
123 // Starts exporting metrics through a platform-specific monitoring API (if
124 // provided). For builds using "tensorflow/core/platform/default", this is
125 // currently a no-op.
126 worker_session_created->GetCell()->Set(true);
127 monitoring::StartExporter();
128}
129
130/* static */
131std::shared_ptr<WorkerSession> WorkerSession::CreateWithBorrowedDeviceMgr(

Callers

nothing calls this directly

Calls 5

StartExporterFunction · 0.85
emptyMethod · 0.45
getMethod · 0.45
SetMethod · 0.45
GetCellMethod · 0.45

Tested by

no test coverage detected