diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-10-03 10:26:41 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-03 10:31:44 -0700 |
commit | 0f9baa02a4e32b672b0cc29e99d5bfcf1329988c (patch) | |
tree | dc1c945c2a60d90b0b652c93cb92cc503fa617cf /tensorflow/python/framework | |
parent | a5b3cd8b4d28cfcdcb9adb3d3568b168b9b8a088 (diff) |
Re-enable the arithmetic optimizer by default in tests.
Add a warning to not disable optimizers without consulting with the Grappler team.
PiperOrigin-RevId: 215584369
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r-- | tensorflow/python/framework/test_util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py index 6673bc5561..4ec4b41b5e 100644 --- a/tensorflow/python/framework/test_util.py +++ b/tensorflow/python/framework/test_util.py @@ -1992,10 +1992,12 @@ class TensorFlowTestCase(googletest.TestCase): # Don't perform optimizations for tests so we don't inadvertently run # gpu ops on cpu config.graph_options.optimizer_options.opt_level = -1 + # Disable Grappler constant folding since some tests & benchmarks + # use constant input and become meaningless after constant folding. + # DO NOT DISABLE GRAPPLER OPTIMIZERS WITHOUT CONSULTING WITH THE + # GRAPPLER TEAM. config.graph_options.rewrite_options.constant_folding = ( rewriter_config_pb2.RewriterConfig.OFF) - config.graph_options.rewrite_options.arithmetic_optimization = ( - rewriter_config_pb2.RewriterConfig.OFF) config.graph_options.rewrite_options.pin_to_host_optimization = ( rewriter_config_pb2.RewriterConfig.OFF) return config |