diff options
Diffstat (limited to 'tensorflow/compiler/tf2xla/test_util.cc')
-rw-r--r-- | tensorflow/compiler/tf2xla/test_util.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/compiler/tf2xla/test_util.cc b/tensorflow/compiler/tf2xla/test_util.cc index 3c6c9a91b6..f31bfb45a2 100644 --- a/tensorflow/compiler/tf2xla/test_util.cc +++ b/tensorflow/compiler/tf2xla/test_util.cc @@ -40,4 +40,12 @@ Status InstantiateFunctionForTest(const string& name, return Status::OK(); } +std::unordered_map<string, Node*> BuildNodeIndex(const Graph& graph) { + std::unordered_map<string, Node*> index; + for (Node* node : graph.nodes()) { + index[node->name()] = node; + } + return index; +} + } // namespace tensorflow |