aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api.h
diff options
context:
space:
mode:
authorGravatar Mingsheng Hong <hongm@google.com>2018-07-30 18:32:40 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-30 18:36:51 -0700
commit92d16b85f9fc38348207047704c66aaeefb75bdf (patch)
tree0a77855f77db338e0c91995b2ff5595e7d84d15e /tensorflow/c/c_api.h
parent08db4a7b13c18a149ded2e5c023e4267364e47d6 (diff)
Added a C API to get a TF function name.
PiperOrigin-RevId: 206684358
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r--tensorflow/c/c_api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h
index c8ae6f2dd1..7e97351c8a 100644
--- a/tensorflow/c/c_api.h
+++ b/tensorflow/c/c_api.h
@@ -1236,6 +1236,11 @@ TF_CAPI_EXPORT extern TF_Function* TF_GraphToFunction(
int noutputs, const TF_Output* outputs, const char* const* output_names,
const TF_FunctionOptions* opts, const char* description, TF_Status* status);
+// Returns the name of the graph function.
+// The return value points to memory that is only usable until the next
+// mutation to *func.
+TF_CAPI_EXPORT extern const char* TF_FunctionName(TF_Function* func);
+
// Write out a serialized representation of `func` (as a FunctionDef protocol
// message) to `output_func_def` (allocated by TF_NewBuffer()).
// `output_func_def`'s underlying buffer will be freed when TF_DeleteBuffer()