提交 2cf258e3 编写于 作者: W Wojciech Uss 提交者: Michal Gallus

remove redundant pass list

上级 5632019f
......@@ -226,21 +226,18 @@ void AnalysisPredictor::OptimizeInferenceProgram() {
argument_.origin_program_desc.reset(
new ProgramDesc(*inference_program_->Proto()));
bool use_mkldnn = config_._use_mkldnn;
switch (config_.ir_mode) {
case contrib::AnalysisConfig::IrPassMode::kExclude:
Analyzer()
.IncludeAllIrPasses()
.SetUseMkldnn(use_mkldnn)
.DisableIrPasses(use_mkldnn ? config_.ir_mkldnn_passes
: config_.ir_passes)
.SetUseMkldnn(config_._use_mkldnn)
.DisableIrPasses(config_.ir_passes)
.Run(&argument_);
break;
case contrib::AnalysisConfig::IrPassMode::kInclude:
Analyzer()
.SetUseMkldnn(use_mkldnn)
.IncludeIrPasses(use_mkldnn ? config_.ir_mkldnn_passes
: config_.ir_passes)
.SetUseMkldnn(config_._use_mkldnn)
.IncludeIrPasses(config_.ir_passes)
.Run(&argument_);
break;
default:
......
......@@ -262,7 +262,6 @@ struct AnalysisConfig : public NativeConfig {
void SetIncludeMode() {
ir_mode = IrPassMode::kInclude;
ir_passes = {"infer_clean_graph_pass"};
ir_mkldnn_passes = {"infer_clean_graph_pass"};
}
// Determine whether to perform graph optimization.
......@@ -271,8 +270,6 @@ struct AnalysisConfig : public NativeConfig {
IrPassMode ir_mode{IrPassMode::kExclude};
// passes to be excluded/included
std::vector<std::string> ir_passes{"embedding_fc_lstm_fuse_pass"};
// passes to be excluded/included when MKL-DNN is enabled
std::vector<std::string> ir_mkldnn_passes{"embedding_fc_lstm_fuse_pass"};
// NOT stable yet.
bool use_feed_fetch_ops{true};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册