diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-04-02 16:45:16 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-02 16:47:23 -0700 |
commit | 19f7990d06b672e9a8f5085b42bb6822e4877a8b (patch) | |
tree | 49ba7d25d9f722847c70849e1f72bf69410893e0 /tensorflow/core/protobuf | |
parent | 817eddd18b7c1c569bb6d284f13bd9d496b415a9 (diff) |
Add a config option to run Grappler optimizers more than once.
Don't crash in layout optimizer if no cluster is given.
Clean up Cluster::DisableOptimizer() so it actually turns all current optimizers off.
PiperOrigin-RevId: 191368433
Diffstat (limited to 'tensorflow/core/protobuf')
-rw-r--r-- | tensorflow/core/protobuf/rewriter_config.proto | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/core/protobuf/rewriter_config.proto b/tensorflow/core/protobuf/rewriter_config.proto index bb772460b0..9b6202e7b4 100644 --- a/tensorflow/core/protobuf/rewriter_config.proto +++ b/tensorflow/core/protobuf/rewriter_config.proto @@ -29,6 +29,14 @@ message RewriterConfig { AGGRESSIVE = 3; } + // Enum controling the number of times to run optimizers. The default is to + // run them once. + enum NumIterationsType { + DEFAULT_NUM_ITERS = 0; + ONE = 1; + TWO = 2; + } + // Optimize tensor layouts (default is ON) // e.g. This will try to use NCHW layout on GPU which is faster. Toggle layout_optimizer = 1; @@ -51,6 +59,10 @@ message RewriterConfig { // If true, don't remove unnecessary ops from the graph bool disable_model_pruning = 2; + // Controls how many times we run the optimizers in meta optimizer (default + // is once). + NumIterationsType meta_optimizer_iterations = 12; + enum MemOptType { // The default setting (SCHEDULING and SWAPPING HEURISTICS only) DEFAULT_MEM_OPT = 0; |