aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-29 14:13:01 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-29 14:17:54 -0700
commit4cf1b45b2e9188086bcb7d12654cd3e130e9b823 (patch)
tree4ca1c9b6a8b9cd2f632e82269a1eab8e29571639 /tensorflow/core/grappler
parent639d0dd8c1ba8d2956ccb59604c157de7ba0a7f2 (diff)
Disable PinToHostOptimizer for NoOp.
PiperOrigin-RevId: 215079134
Diffstat (limited to 'tensorflow/core/grappler')
-rw-r--r--tensorflow/core/grappler/optimizers/pin_to_host_optimizer.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/core/grappler/optimizers/pin_to_host_optimizer.cc b/tensorflow/core/grappler/optimizers/pin_to_host_optimizer.cc
index 2190d38937..89eb76046e 100644
--- a/tensorflow/core/grappler/optimizers/pin_to_host_optimizer.cc
+++ b/tensorflow/core/grappler/optimizers/pin_to_host_optimizer.cc
@@ -169,7 +169,13 @@ bool IsTPUGraphDef(const GraphDef& def) {
}
// All the nodes that should be blacklisted and not swapped.
-bool IsBlacklisted(const NodeDef& node) { return IsCollective(node); }
+bool IsBlacklisted(const NodeDef& node) {
+ return
+ // Collective ops should not be swapped.
+ IsCollective(node) ||
+ // NoOp breaks perf regression tests (probably due to group dependencies).
+ IsNoOp(node);
+}
} // end namespace internal
Status PinToHostOptimizer::Optimize(Cluster* cluster, const GrapplerItem& item,