diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-22 05:15:18 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-22 05:19:06 -0700 |
commit | ca552d54ac67be8837aeabdb43269846d9df4eb5 (patch) | |
tree | 11d592685766ab64187b520d91d7dfa2b6f231fc /tensorflow/python/framework | |
parent | e317152dad1aa66bc493abc046a60dbbf650de92 (diff) |
Add PinToHostOptimizer to grappler: force small ops to happen on CPU (instead of
GPU). This avoids many unnecessary CPU<->GPU memcpy and syncs.
PiperOrigin-RevId: 214108484
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r-- | tensorflow/python/framework/test_util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py index c302072aa1..68b7b323d5 100644 --- a/tensorflow/python/framework/test_util.py +++ b/tensorflow/python/framework/test_util.py @@ -1934,6 +1934,8 @@ class TensorFlowTestCase(googletest.TestCase): 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 return ErrorLoggingSession(graph=graph, config=prepare_config(config)) |