Browse Source

mstune bugfix for build_step of after merge

tags/v1.1.0
gengchao4@huawei.com 4 years ago
parent
commit
9d41dc2f78
2 changed files with 6 additions and 10 deletions
  1. +4
    -9
      ge/graph/manager/graph_manager.cc
  2. +2
    -1
      ge/graph/optimize/graph_optimize.cc

+ 4
- 9
ge/graph/manager/graph_manager.cc View File

@@ -693,15 +693,10 @@ Status GraphManager::PreRun(const GraphNodePtr &graph_node, const std::vector<Ge
}
}

// BUILD_MODE_TUNING with BUILD_STEP_AFTER_MERGE no need PreRunOptimizeSubGraph.
bool run_optimize_subgraph =
!((options_.build_mode == BUILD_MODE_TUNING) && (options_.build_step == BUILD_STEP_AFTER_MERGE));
if (run_optimize_subgraph) {
Status ret = PreRunOptimizeSubGraph(graph_node, compute_graph, session_id);
if (ret != SUCCESS) {
GELOGE(ret, "Run PreRunOptimizeSubGraph failed for graph:%s.", compute_graph->GetName().c_str());
return ret;
}
ret = PreRunOptimizeSubGraph(graph_node, compute_graph, session_id);
if (ret != SUCCESS) {
GELOGE(ret, "Run PreRunOptimizeSubGraph failed for graph:%s.", compute_graph->GetName().c_str());
return ret;
}

/// 1. BUILD_MODE_TUNING with BUILD_STEP_BEFORE_UB_MATCH no need PreRunAfterOptimizeSubGraph;


+ 2
- 1
ge/graph/optimize/graph_optimize.cc View File

@@ -101,7 +101,8 @@ Status GraphOptimize::OptimizeSubGraph(ComputeGraphPtr &compute_graph, const std
return SUCCESS;
}

if (build_mode_ == BUILD_MODE_TUNING && build_step_ == BUILD_STEP_AFTER_UB_MATCH) {
if (build_mode_ == BUILD_MODE_TUNING &&
(build_step_ == BUILD_STEP_AFTER_UB_MATCH || build_step_ == BUILD_STEP_AFTER_MERGE)) {
for (auto iter = graph_optimizer.begin(); iter != graph_optimizer.end(); ++iter) {
Status ret = (*iter)->OptimizeFusedGraphAfterGraphSlice(*(compute_graph));
if (ret != SUCCESS) {


Loading…
Cancel
Save