Second invocation of the model pruner after all other optimizers removes too many nodes in some cases in TF 2.0 mode.
PiperOrigin-RevId: 240180399
This commit is contained in:
parent
e6ee14fb0e
commit
120cc36f0e
@ -447,10 +447,6 @@ Status MetaOptimizer::OptimizeGraph(Cluster* cluster, const GrapplerItem& item,
|
||||
optimization_results_.push_back(optimization_result);
|
||||
|
||||
if (is_optimized) {
|
||||
// Run the model pruner again to clean things up.
|
||||
if (!cfg_.disable_model_pruning() && model_pruner != nullptr) {
|
||||
RUN_OPTIMIZER_OR_RETURN_IF_ERROR(model_pruner);
|
||||
}
|
||||
TF_RETURN_IF_ERROR(TopologicalSort(optimized_graph));
|
||||
ReassignColocation(optimized_graph);
|
||||
// Make sure that the optimizers preserved the graph version.
|
||||
|
Loading…
Reference in New Issue
Block a user