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

Method StartRunners

tensorflow/cc/training/prefetch_runner.cc:228–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228Status PrefetchRunnerMgr::StartRunners(std::string graph_key, Session* sess) {
229 if (register_runner_options_.count(graph_key) == 0)
230 return Status(
231 errors::NotFound("graph <" + graph_key + "> has no PrefetchRunner"));
232
233 if (prefetch_runners_.count(sess) != 0)
234 return Status(errors::AlreadyExists(
235 "PrefetchRunners has already started in Session."));
236
237 // Create and Start the PrefetchRunners.
238 coords_[sess].reset(new Coordinator());
239
240 for (auto option : register_runner_options_[graph_key]) {
241 std::unique_ptr<PrefetchRunner> runner(new PrefetchRunner(
242 graph_key, option.first, sess, coords_[sess].get(), option.second));
243 prefetch_runners_[sess].insert(runner.get());
244 coords_[sess]->RegisterRunner(std::move(runner));
245 }
246
247 for (auto runner : prefetch_runners_[sess])
248 runner->Start();
249
250 return Status::OK();
251}
252
253Status PrefetchRunnerMgr::StopRunners(std::string graph_key, Session* sess) {
254 if (prefetch_runners_.count(sess) == 0)

Callers 1

TF_StartPrefetchRunnersFunction · 0.80

Calls 8

NotFoundFunction · 0.85
RegisterRunnerMethod · 0.80
StatusClass · 0.50
countMethod · 0.45
resetMethod · 0.45
getMethod · 0.45
insertMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected