aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/op_types.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-03-26 11:44:19 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-26 11:46:47 -0700
commit6d46c21e9f300d07e30a2185671f07d34fac3999 (patch)
tree35dcdff9757f660d2c34e4a7da4c78640a1ddd3c /tensorflow/core/grappler/op_types.h
parent73937a7096908a9ae01dd7da2d76932a7fed194b (diff)
Make the CSE ("node deduping") pass in ArithmeticOptimizer more robust in the presence of ops that modify their inputs in-place: Do not dedup nodes if the underlying buffers for their outputs may be passed to an in-place op.
PiperOrigin-RevId: 190499037
Diffstat (limited to 'tensorflow/core/grappler/op_types.h')
-rw-r--r--tensorflow/core/grappler/op_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/op_types.h b/tensorflow/core/grappler/op_types.h
index 49e01f68e3..1ec1cd46e3 100644
--- a/tensorflow/core/grappler/op_types.h
+++ b/tensorflow/core/grappler/op_types.h
@@ -154,8 +154,12 @@ bool IsCommutative(const NodeDef& node);
bool IsPersistent(const NodeDef& node);
bool IsFreeOfSideEffect(const NodeDef& node);
+
bool ModifiesFrameInfo(const NodeDef& node);
+// Returns true if the op is known to write to one or more of its inputs.
+bool ModifiesInputsInPlace(const NodeDef& node);
+
// Returns true if the op is an element-wise involution, i.e. if it is its
// own inverse such that f(f(x)) == x.
bool IsInvolution(const NodeDef& node);