From: A. Unique TensorFlower Date: Thu, 5 Apr 2018 18:30:35 +0000 (-0700) Subject: Automated g4 rollback of changelist 191761109 X-Git-Tag: tflite-v0.1.7~16^2^2~149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b691c039c978a34ac4baa47e0e20b9c9d46aa6f7;p=platform%2Fupstream%2Ftensorflow.git Automated g4 rollback of changelist 191761109 PiperOrigin-RevId: 191771969 --- diff --git a/tensorflow/core/grappler/optimizers/function_optimizer.cc b/tensorflow/core/grappler/optimizers/function_optimizer.cc index 1dd75db..f1da469 100644 --- a/tensorflow/core/grappler/optimizers/function_optimizer.cc +++ b/tensorflow/core/grappler/optimizers/function_optimizer.cc @@ -62,6 +62,12 @@ class FunctionInliningContext { 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 || @@ -200,11 +206,6 @@ Status InlineFunction(const NodeDef& func_node, const FunctionDef& func, TF_RETURN_IF_ERROR(InlineFunction(func_body_node, *func_body_node_func, ctx, optimized_graph)); } else { - // Annotate the node with the function attributes. - for (const auto& attr : func.attr()) { - func_body_node.mutable_attr()->insert(attr); - } - // Move the node to the main graph optimized_graph->add_node()->Swap(&func_body_node); }