diff options
author | 2017-06-02 10:05:28 -0700 | |
---|---|---|
committer | 2017-06-02 10:09:08 -0700 | |
commit | f661128dbf1b591202772a73878da6fff75c9432 (patch) | |
tree | 1927b3310cc0144e0125cc8ca64c3f4942613f48 /tensorflow/core/util | |
parent | a56d59a84bcd90ad9126b669dea5e6d8e38952f0 (diff) |
Remove unused overloads of SummarizeGraphDef and EqualGraphDef
PiperOrigin-RevId: 157843404
Diffstat (limited to 'tensorflow/core/util')
-rw-r--r-- | tensorflow/core/util/equal_graph_def.cc | 32 | ||||
-rw-r--r-- | tensorflow/core/util/equal_graph_def.h | 2 |
2 files changed, 10 insertions, 24 deletions
diff --git a/tensorflow/core/util/equal_graph_def.cc b/tensorflow/core/util/equal_graph_def.cc index 8ad91e5adb..2db026da56 100644 --- a/tensorflow/core/util/equal_graph_def.cc +++ b/tensorflow/core/util/equal_graph_def.cc @@ -24,10 +24,16 @@ limitations under the License. namespace tensorflow { -template <class NodeDefs> -static bool EqualNodeDefsHelper( - const NodeDefs& actual, const protobuf::RepeatedPtrField<NodeDef>& expected, - string* diff, const EqualGraphDefOptions& options) { +bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, + string* diff, const EqualGraphDefOptions& options) { + // Intentionally do not check that versions match so that this routine can + // be used for less brittle golden file tests. + return EqualRepeatedNodeDef(actual.node(), expected.node(), diff, options); +} + +bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual, + const protobuf::RepeatedPtrField<NodeDef>& expected, + string* diff, const EqualGraphDefOptions& options) { std::unordered_map<string, const NodeDef*> actual_index; for (const NodeDef& node : actual) { actual_index[node.name()] = &node; @@ -62,24 +68,6 @@ static bool EqualNodeDefsHelper( return true; } -bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, - string* diff, const EqualGraphDefOptions& options) { - // Intentionally do not check that versions match so that this routine can - // be used for less brittle golden file tests. - return EqualNodeDefsHelper(actual.node(), expected.node(), diff, options); -} - -bool EqualGraphDef(gtl::ArraySlice<NodeDef> actual, const GraphDef& expected, - string* diff, const EqualGraphDefOptions& options) { - return EqualNodeDefsHelper(actual, expected.node(), diff, options); -} - -bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual, - const protobuf::RepeatedPtrField<NodeDef>& expected, - string* diff, const EqualGraphDefOptions& options) { - return EqualNodeDefsHelper(actual, expected, diff, options); -} - namespace { string JoinStringField(const protobuf::RepeatedPtrField<string>& f) { diff --git a/tensorflow/core/util/equal_graph_def.h b/tensorflow/core/util/equal_graph_def.h index 29d0385493..1ce6181c2e 100644 --- a/tensorflow/core/util/equal_graph_def.h +++ b/tensorflow/core/util/equal_graph_def.h @@ -36,8 +36,6 @@ struct EqualGraphDefOptions { // nodes must be consistent. bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected, string* diff, const EqualGraphDefOptions& options = {}); -bool EqualGraphDef(gtl::ArraySlice<NodeDef> actual, const GraphDef& expected, - string* diff, const EqualGraphDefOptions& options = {}); // Determines if actual and expected are equal, ignoring: ordering of // attrs, internal attributes (if set in `options`), and control inputs. |