Browse Source

!888 add SwitchDeadBranchElimination & MergePass in graph prepare

From: @chen_yemeng
Reviewed-by: @sheng-nan,@xchu42
Signed-off-by: @startzgf168,@ji_chen
pull/888/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
0126007d89
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      ge/graph/preprocess/graph_preprocess.cc

+ 4
- 0
ge/graph/preprocess/graph_preprocess.cc View File

@@ -1646,6 +1646,10 @@ Status GraphPrepare::InferShapeForPreprocess() {
if (!options_.train_graph_flag) { if (!options_.train_graph_flag) {
names_to_passes.emplace_back("AssertPass", &assert_pass); names_to_passes.emplace_back("AssertPass", &assert_pass);
} }
SwitchDeadBranchElimination switch_dead_branch_elimination;
names_to_passes.emplace_back("SwitchDeadBranchElimination", &switch_dead_branch_elimination);
MergePass merge_pass;
names_to_passes.emplace_back("MergePass", &merge_pass);
InferShapePass infer_shape_pass; InferShapePass infer_shape_pass;
names_to_passes.emplace_back("InferShapePass", &infer_shape_pass); names_to_passes.emplace_back("InferShapePass", &infer_shape_pass);
ReplaceWithEmptyConstPass replace_with_empty_const_pass; ReplaceWithEmptyConstPass replace_with_empty_const_pass;


Loading…
Cancel
Save