Automated g4 rollback of changelist 191385909
authorGunhan Gulsoy <gunan@google.com>
Tue, 3 Apr 2018 06:44:24 +0000 (23:44 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 3 Apr 2018 06:47:03 +0000 (23:47 -0700)
PiperOrigin-RevId: 191401933

tensorflow/core/grappler/optimizers/function_optimizer.cc

index 6cdc51f..2a6b8a3 100644 (file)
@@ -286,6 +286,12 @@ Status FunctionOptimizer::Optimize(Cluster* cluster, const GrapplerItem& item,
     if (func.attr().count("_noinline") != 0) {
       continue;
     }
+    // Don't touch anything marked XLA to prevent XLA failures further down the
+    // road.
+    if (func.attr().count("_XlaCompile") > 0 &&
+        func.attr().at("_XlaCompile").b()) {
+      continue;
+    }
     // Can't create IdentityN nodes with no input or output: skip these
     // functions for now.
     if (func.signature().input_arg_size() == 0 ||