aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api_experimental.h
diff options
context:
space:
mode:
authorGravatar Mingsheng Hong <hongm@google.com>2018-03-21 17:38:04 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-21 17:41:09 -0700
commit8e4e9f7ceaa78f76b7f0aaa7a607e80e67f0d912 (patch)
tree2c6990449eda2f6e13b7ff7dc140ec360dac0b5e /tensorflow/c/c_api_experimental.h
parent637b090ea0a5029805ba5e1dcf41c3b57d944ae4 (diff)
Added an experimental C API to dump TF_Graph in a human-readable format, for
debugging purposes. PiperOrigin-RevId: 189997099
Diffstat (limited to 'tensorflow/c/c_api_experimental.h')
-rw-r--r--tensorflow/c/c_api_experimental.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/c/c_api_experimental.h b/tensorflow/c/c_api_experimental.h
index 2bad278d63..b95cdfe6aa 100644
--- a/tensorflow/c/c_api_experimental.h
+++ b/tensorflow/c/c_api_experimental.h
@@ -94,6 +94,12 @@ TF_CAPI_EXPORT extern void TF_ShutdownTPUExecution(TF_Session* session,
TF_Output shutdown_node,
TF_Status* status);
+// Returns the graph content in a human-readable format, with length set in
+// `len`. The format is subject to change in the future.
+// The returned string is heap-allocated, and caller should call free() on it.
+TF_CAPI_EXPORT extern const char* TF_GraphDebugString(TF_Graph* graph,
+ size_t* len);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif