diff --git a/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc b/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc index 876438ae261..5ca65210d29 100644 --- a/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc +++ b/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc @@ -306,17 +306,25 @@ void AscendBackendOptimization(const std::shared_ptr &kern other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); - other_pm->AddPass(std::make_shared()); - other_pm->AddPass(std::make_shared()); - if (context_ptr->enable_task_sink() && context_ptr->loop_sink_flag() && ConfigManager::GetInstance().iter_num() > 1) { - other_pm->AddPass(std::make_shared()); - } - other_pm->AddPass(std::make_shared()); optimizer->AddPassManager(other_pm); (void)optimizer->Optimize(kernel_graph); kernel_graph->SetExecOrderByDefault(); // buffer fusion AscendBackendUBFusionOptimization(kernel_graph); + + // other2 optimization + auto optimizer2 = std::make_shared(); + auto other2_pm = std::make_shared("other2_pm"); + other2_pm->AddPass(std::make_shared()); + other2_pm->AddPass(std::make_shared()); + if (context_ptr->enable_task_sink() && context_ptr->loop_sink_flag() && ConfigManager::GetInstance().iter_num() > 1) { + other2_pm->AddPass(std::make_shared()); + } + other2_pm->AddPass(std::make_shared()); + optimizer2->AddPassManager(other2_pm); + (void)optimizer2->Optimize(kernel_graph); + kernel_graph->SetExecOrderByDefault(); + if (save_graphs) { std::string file_path = save_graphs_path + "/" + "hwopt_d_end" + "_graph_" + std::to_string(kernel_graph->graph_id()) + ".ir";