diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-04-21 15:26:38 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-04-21 16:32:17 -0700 |
commit | 2c46a9ed5f6faaf9f3a407582dd657efa91c24ea (patch) | |
tree | 01ce3a53b71cec9eb8378d0373189ee536eb8552 /tensorflow/core/distributed_runtime/graph_mgr.cc | |
parent | b0053182981967255f5a6024b432bf8f2127ba12 (diff) |
Instead of just validating the memory type. Fix them if they are not
compatible.
Change: 120497594
Diffstat (limited to 'tensorflow/core/distributed_runtime/graph_mgr.cc')
-rw-r--r-- | tensorflow/core/distributed_runtime/graph_mgr.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tensorflow/core/distributed_runtime/graph_mgr.cc b/tensorflow/core/distributed_runtime/graph_mgr.cc index dd1e9cb625..9ccc00b4e8 100644 --- a/tensorflow/core/distributed_runtime/graph_mgr.cc +++ b/tensorflow/core/distributed_runtime/graph_mgr.cc @@ -169,9 +169,10 @@ Status GraphMgr::InitItem(const string& session, const GraphDef& gdef, opseg->AddHold(session); // Function library runtime. - unit->lib = NewFunctionLibraryRuntime( - unit->device, runner, def->versions().producer(), item->lib_def, - graph_options.optimizer_options()); + unit->lib = + NewFunctionLibraryRuntime(worker_env_->device_mgr, unit->device, runner, + def->versions().producer(), item->lib_def, + graph_options.optimizer_options()); // Construct the root executor for the subgraph. params.device = unit->device; @@ -199,7 +200,8 @@ Status GraphMgr::InitItem(const string& session, const GraphDef& gdef, }; optimizer.Optimize(lib, params.device, &subgraph); - s = ValidateMemoryTypes(DeviceType(unit->device->device_type()), subgraph); + s = EnsureMemoryTypes(DeviceType(unit->device->device_type()), + unit->device->name(), subgraph); if (!s.ok()) { delete subgraph; break; |