aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-03-14 20:39:10 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-14 20:44:02 -0700
commit9037e241de1e64044ff55ab539ccc1fb013c178a (patch)
treef7b8bda19a5efdd57f99ce9cd7b0bf6fed211628 /tensorflow/core/grappler/optimizers/arithmetic_optimizer.h
parent357cd4b8b2f960520fc57b6cfbf41117a2a20fc7 (diff)
Enable Add/AddN tree rewrite for symbolically equal shapes.
1) Rewrite a tree of Add/AddN ops with a single AddN, if all shapes are symbolically equal 2) Lookup shape properties using GraphProperties instead of direct access to Node attributes PiperOrigin-RevId: 189131726
Diffstat (limited to 'tensorflow/core/grappler/optimizers/arithmetic_optimizer.h')
-rw-r--r--tensorflow/core/grappler/optimizers/arithmetic_optimizer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h
index d5a7af5ba6..2c6b52c072 100644
--- a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h
+++ b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h
@@ -55,6 +55,9 @@ class ArithmeticOptimizer : public GraphOptimizer {
// Granular control for arithmetic optimizer stages
struct ArithmeticOptimizerOptions {
+ // TODO(ezhulenev): flag do disable TrySimplifyAndReplaceUses in tests.
+ // Remove when all optimizers will be migrated to separate stages.
+ bool enable_try_simplify_and_replace = true;
bool combine_add_to_addn = true;
bool hoist_common_factor_out_of_aggregation = true;
bool remove_inverse_transpose = true;