aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/hash
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2017-07-26 16:47:29 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-26 16:52:00 -0700
commit6028c071b592330fabf107df08d880ec443d6844 (patch)
treea1b4c1de7ea86a99aae1312093f97a20669665ef /tensorflow/core/lib/hash
parentce7a355bd8b63b881aaaa7de216cd198267a596f (diff)
Highlight incoming/outgoing edges on hover in HLO graphviz dumps, and other improvements.
Other improvements: - Don't show tooltips for nodes and clusters. Previously we'd show a tooltip containing a pointer value expressed as decimal. Not so useful. - Show tooltips on edges with the to/from node names. - Fix bug wherein if we had - a node at the "edge" of the graph (so its operands aren't included unless they're referenced by another node), - with all of its operands included in the graph save one or more constants, and - those constants weren't referenced by any nodes not at the edge of the graph, we would incorrectly draw the node as "grayed out", indicating that one of its operands (namely, its constant operand) wasn't present in the graph. This is wrong because constants are inlined into their users, so they should always count as "displayed" for the purposes of determining whether a node is grayed out. PiperOrigin-RevId: 163276108
Diffstat (limited to 'tensorflow/core/lib/hash')
-rw-r--r--tensorflow/core/lib/hash/hash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/core/lib/hash/hash.h b/tensorflow/core/lib/hash/hash.h
index 73b7c94d1f..77b8031598 100644
--- a/tensorflow/core/lib/hash/hash.h
+++ b/tensorflow/core/lib/hash/hash.h
@@ -77,6 +77,13 @@ struct hash<StringPiece> {
}
};
+template <typename T, typename U>
+struct hash<std::pair<T, U>> {
+ size_t operator()(const std::pair<T, U>& p) const {
+ return Hash64Combine(hash<T>()(p.first), hash<U>()(p.second));
+ }
+};
+
} // namespace tensorflow
#endif // TENSORFLOW_LIB_HASH_HASH_H_