diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2017-04-17 07:08:36 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-17 08:37:38 -0700 |
commit | b01685c9ab8c03c814a0b4f720223a87cd928467 (patch) | |
tree | 69e33b0ee7c68f1abfe6ef960420b96fde83c2f6 /tensorflow/core/distributed_runtime/graph_mgr.cc | |
parent | 8382abdd54ae12ad5563c3df93107b7daecf3e04 (diff) |
GraphManager::InitItem(): don't pass FunctionLibraryDefinition to Graph ctor
ConvertGraphDefToGraph() adds functions to the graph now, so there's
no need to explicitly pass them into the graph constructor. This
change also makes Partition() add the function library to the
partition GraphDefs, so the ConvertGraphDefToGraph() call for each
partition yields a graph with the function library (previous to this
change partition GraphDefs never had functions, and the function
library was manually passed to the graph in the ctor).
I also tried switching more functionality in GraphMgr to using the
function library in the graphs instead of maintaining separate
libraries, but the graphs' lifetimes make this non-trivial. I might
try cleaning this up more in a subsequent patch.
Change: 153344952
Diffstat (limited to 'tensorflow/core/distributed_runtime/graph_mgr.cc')
-rw-r--r-- | tensorflow/core/distributed_runtime/graph_mgr.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/distributed_runtime/graph_mgr.cc b/tensorflow/core/distributed_runtime/graph_mgr.cc index 545ae867f6..36b7b5b628 100644 --- a/tensorflow/core/distributed_runtime/graph_mgr.cc +++ b/tensorflow/core/distributed_runtime/graph_mgr.cc @@ -120,7 +120,7 @@ Status GraphMgr::InitItem(const string& session, const GraphDef& gdef, } // Constructs the graph out of "gdef". - Graph graph(item->lib_def); + Graph graph(OpRegistry::Global()); GraphConstructorOptions opts; opts.allow_internal_ops = true; opts.expect_device_spec = true; @@ -152,7 +152,7 @@ Status GraphMgr::InitItem(const string& session, const GraphDef& gdef, std::unordered_map<string, std::unique_ptr<Graph>> partition_graphs; for (const auto& partition : partitions) { - std::unique_ptr<Graph> device_graph(new Graph(item->lib_def)); + std::unique_ptr<Graph> device_graph(new Graph(OpRegistry::Global())); GraphConstructorOptions device_opts; // There are internal operations (e.g., send/recv) that we now allow. device_opts.allow_internal_ops = true; |