aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/node_def_util.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-07-27 14:03:25 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-27 14:07:05 -0700
commit81d927bfc7e1e4c7b28aabdb0c64a12cec2833fe (patch)
treedb8ce58fcb792df76624a5e3f94d502a16aba1bf /tensorflow/core/framework/node_def_util.h
parent388d0d860110a19a9d133fe4de85f8f6fa060cde (diff)
Adding NodeDef names to error messages for better debuggability.
The format used is as follows: {{node <node_name>}} PiperOrigin-RevId: 206370355
Diffstat (limited to 'tensorflow/core/framework/node_def_util.h')
-rw-r--r--tensorflow/core/framework/node_def_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/core/framework/node_def_util.h b/tensorflow/core/framework/node_def_util.h
index 64c8b386e8..c012b7c3d3 100644
--- a/tensorflow/core/framework/node_def_util.h
+++ b/tensorflow/core/framework/node_def_util.h
@@ -50,6 +50,12 @@ extern const char* const kColocationGroupPrefix;
string SummarizeNode(const Node& node);
string SummarizeNodeDef(const NodeDef& node_def);
+// Produces a formatted string pattern from the node which can uniquely identify
+// this node upstream to produce an informative error message. The pattern
+// followed is: {{node <node_name>}}
+string FormatNodeForError(const Node& node);
+string FormatNodeDefForError(const NodeDef& node_def);
+
typedef protobuf::Map<string, AttrValue> AttrValueMap;
// Adds an attr with name <name> and value <value> to *node_def.