"//tensorflow/core/kernels:dense_update_ops",
"//tensorflow/core/kernels:fifo_queue_op",
"//tensorflow/core/kernels:function_ops",
+ "//tensorflow/core/kernels:identity_n_op",
"//tensorflow/core/kernels:identity_op",
"//tensorflow/core/kernels:matmul_op",
"//tensorflow/core/kernels:ops_util",
"//tensorflow/core/kernels:fifo_queue_op",
"//tensorflow/core/kernels:function_ops",
"//tensorflow/core/kernels:identity_op",
+ "//tensorflow/core/kernels:identity_n_op",
"//tensorflow/core/kernels:matmul_op",
"//tensorflow/core/kernels:ops_util",
"//tensorflow/core/kernels:queue_ops",
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) {
+ continue;
+ }
// Can't create IdentityN nodes with no input or output: skip these
// functions for now.
if (func.signature().input_arg_size() == 0 ||
if (!cfg_.disable_model_pruning()) {
optimizers.push_back(std::unique_ptr<GraphOptimizer>(new ModelPruner()));
}
- if (cfg_.function_optimization() == RewriterConfig::ON) {
+ if (cfg_.function_optimization() != RewriterConfig::OFF) {
optimizers.push_back(
std::unique_ptr<GraphOptimizer>(new FunctionOptimizer()));
}
bool MetaOptimizerEnabled(const RewriterConfig& cfg) {
return !cfg.disable_model_pruning() ||
cfg.layout_optimizer() != RewriterConfig::OFF ||
- cfg.function_optimization() == RewriterConfig::ON ||
+ cfg.function_optimization() != RewriterConfig::OFF ||
cfg.constant_folding() != RewriterConfig::OFF ||
cfg.arithmetic_optimization() != RewriterConfig::OFF ||
cfg.loop_optimization() == RewriterConfig::ON ||
Toggle dependency_optimization = 8;
// Loop optimizations (default is OFF).
Toggle loop_optimization = 9;
- // Function optimizations (default is OFF).
+ // Function optimizations (default is ON).
Toggle function_optimization = 10;
// If true, don't remove unnecessary ops from the graph
bool disable_model_pruning = 2;