aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_test_util.h
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2017-12-11 14:41:17 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-11 14:45:28 -0800
commit037f036b2c76ef363148276dce83b7dd1d79e878 (patch)
tree359d2af4fcec51ccb60d42409ce09b03000cfc8e /tensorflow/c/c_test_util.h
parentdd77f385591c8b6ef7ab8dae7429c7eff7813a1e (diff)
Mark a FunctionDef's signature as stateful when it contains a stateful node.
This fixes a bug where two calls to the same stateful function will erroneously be eliminated as common subexpressions. It is also a step towards pruning nodes from function bodies, which is necessary for a variety of `Dataset` optimizations. PiperOrigin-RevId: 178675527
Diffstat (limited to 'tensorflow/c/c_test_util.h')
-rw-r--r--tensorflow/c/c_test_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/c/c_test_util.h b/tensorflow/c/c_test_util.h
index d547337492..96a93afef3 100644
--- a/tensorflow/c/c_test_util.h
+++ b/tensorflow/c/c_test_util.h
@@ -74,6 +74,9 @@ TF_Operation* Neg(TF_Operation* n, TF_Graph* graph, TF_Status* s,
TF_Operation* LessThan(TF_Output l, TF_Output r, TF_Graph* graph, TF_Status* s);
+TF_Operation* RandomUniform(TF_Operation* shape, TF_DataType dtype,
+ TF_Graph* graph, TF_Status* s);
+
// Split `input` along the first dimention into 3 tensors
TF_Operation* Split3(TF_Operation* input, TF_Graph* graph, TF_Status* s,
const char* name = "split3");