From 0d9ee0dced363dd5b44f473857f0c04adc81ca1b Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 25 Sep 2018 10:14:10 +0800 Subject: [PATCH] fix resolve conflicts --- paddle/fluid/framework/details/CMakeLists.txt | 2 +- paddle/fluid/framework/details/build_strategy.cc | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/framework/details/CMakeLists.txt b/paddle/fluid/framework/details/CMakeLists.txt index 0cf11bc9a..e0a3ef5a9 100644 --- a/paddle/fluid/framework/details/CMakeLists.txt +++ b/paddle/fluid/framework/details/CMakeLists.txt @@ -57,5 +57,5 @@ cc_library(fast_threaded_ssa_graph_executor SRCS fast_threaded_ssa_graph_executo cc_library(build_strategy SRCS build_strategy.cc DEPS graph_viz_pass multi_devices_graph_pass - multi_devices_graph_print_pass multi_devices_graph_check_pass, + multi_devices_graph_print_pass multi_devices_graph_check_pass fuse_elewise_add_act_pass) diff --git a/paddle/fluid/framework/details/build_strategy.cc b/paddle/fluid/framework/details/build_strategy.cc index deeb18656..592d5c2be 100644 --- a/paddle/fluid/framework/details/build_strategy.cc +++ b/paddle/fluid/framework/details/build_strategy.cc @@ -37,16 +37,14 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { // Apply op fusion. if (strategy.fuse_elewise_add_act_ops_) { - auto fuse_elewise_add_act_pass = - ir::PassRegistry::Instance().Get("fuse_elewise_add_act_pass"); - graph = fuse_elewise_add_act_pass->Apply(std::move(graph)); + auto fuse_elewise_add_act_pass = AppendPass("fuse_elewise_add_act_pass"); // Apply a graph viz pass to record a graph. if (!strategy.debug_graphviz_path_.empty()) { - auto viz_pass = ir::PassRegistry::Instance().Get("graph_viz_pass"); + auto viz_pass = AppendPass("graph_viz_pass"); const std::string graph_path = string::Sprintf( "%s%s", strategy.debug_graphviz_path_.c_str(), "_fused_graph"); - viz_pass->Set("graph_viz_path", new std::string(graph_path)); - graph = viz_pass->Apply(std::move(graph)); + viz_pass->Set("graph_viz_path", + new std::string(graph_path)); } } -- GitLab