diff options
author | 2018-08-30 22:35:08 -0700 | |
---|---|---|
committer | 2018-08-30 22:39:33 -0700 | |
commit | cb9443831283c2366e3dd91001db6362d6594f66 (patch) | |
tree | b25c357c838569dbff60e9341a5bbfefc71f2463 /tensorflow/core/distributed_runtime | |
parent | 348367a88e02a9e1750738b11a8e0784b2eb6b65 (diff) |
Automated rollback of commit 73a3477356990f2451e220f553c9d7782df836ac
PiperOrigin-RevId: 211037202
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r-- | tensorflow/core/distributed_runtime/master_session.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tensorflow/core/distributed_runtime/master_session.cc b/tensorflow/core/distributed_runtime/master_session.cc index 8e9eec1ed9..abd07e37b7 100644 --- a/tensorflow/core/distributed_runtime/master_session.cc +++ b/tensorflow/core/distributed_runtime/master_session.cc @@ -449,7 +449,7 @@ Status MasterSession::ReffedClientGraph::DoRegisterPartitions( *c->req.mutable_graph_options() = session_opts_.config.graph_options(); *c->req.mutable_debug_options() = callable_opts_.run_options().debug_options(); - c->req.set_collective_graph_key(client_graph()->collective_graph_key); + c->req.set_collective_graph_key(bg_opts_.collective_graph_key); VLOG(2) << "Register " << c->req.graph_def().DebugString(); auto cb = [c, &done](const Status& s) { c->status = s; @@ -1111,6 +1111,10 @@ uint64 HashBuildGraphOptions(const BuildGraphOptions& opts) { h = Hash64(watch_summary.c_str(), watch_summary.size(), h); } + if (opts.collective_graph_key != BuildGraphOptions::kNoCollectiveGraphKey) { + h = Hash64Combine(opts.collective_graph_key, h); + } + return h; } @@ -1784,10 +1788,10 @@ Status MasterSession::PostRunCleanup(MasterSession::ReffedClientGraph* rcg, Status s = run_status; if (s.ok()) { pss->end_micros = Env::Default()->NowMicros(); - if (rcg->client_graph()->collective_graph_key != + if (rcg->build_graph_options().collective_graph_key != BuildGraphOptions::kNoCollectiveGraphKey) { env_->collective_executor_mgr->RetireStepId( - rcg->client_graph()->collective_graph_key, step_id); + rcg->build_graph_options().collective_graph_key, step_id); } // Schedule post-processing and cleanup to be done asynchronously. rcg->ProcessStats(step_id, pss, ph.get(), run_options, out_run_metadata); @@ -1846,7 +1850,7 @@ Status MasterSession::DoRunWithLocalExecution( // Keeps the highest 8 bits 0x01: we reserve some bits of the // step_id for future use. - uint64 step_id = NewStepId(rcg->client_graph()->collective_graph_key); + uint64 step_id = NewStepId(bgopts.collective_graph_key); TRACEPRINTF("stepid %llu", step_id); std::unique_ptr<ProfileHandler> ph; @@ -1910,7 +1914,8 @@ Status MasterSession::DoRunCallable(CallOptions* opts, ReffedClientGraph* rcg, // Prepare. int64 count = rcg->get_and_increment_execution_count(); - const uint64 step_id = NewStepId(rcg->client_graph()->collective_graph_key); + const uint64 step_id = + NewStepId(rcg->build_graph_options().collective_graph_key); TRACEPRINTF("stepid %llu", step_id); const RunOptions& run_options = rcg->callable_options().run_options(); |