From cb7141c2217d42f3b1d97340ff28e36cdb08a57f Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Fri, 19 Apr 2019 16:58:10 +0800 Subject: [PATCH] disable runtime_context_cache pass by default test=develop --- paddle/fluid/inference/api/paddle_pass_builder.cc | 9 ++------- .../inference/tests/api/analyzer_pyramid_dnn_tester.cc | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/inference/api/paddle_pass_builder.cc b/paddle/fluid/inference/api/paddle_pass_builder.cc index 48a140aa1..885d797d6 100644 --- a/paddle/fluid/inference/api/paddle_pass_builder.cc +++ b/paddle/fluid/inference/api/paddle_pass_builder.cc @@ -86,8 +86,7 @@ const std::vector kAnakinSubgraphPasses({ GpuPassStrategy::GpuPassStrategy() : PassStrategy({}) { passes_.assign({ - "infer_clean_graph_pass", // - "runtime_context_cache_pass", // + "infer_clean_graph_pass", // // "identity_scale_op_clean_pass", // "conv_affine_channel_fuse_pass", // "conv_eltwiseadd_affine_channel_fuse_pass", // @@ -116,11 +115,7 @@ CpuPassStrategy::CpuPassStrategy() : PassStrategy({}) { // NOTE the large fusions should be located in the front, so that they will // not be damaged by smaller ones. passes_.assign({ - "infer_clean_graph_pass", // - // TODO(luotao): runtime_context_cache_pass should be located in the - // front, see https://github.com/PaddlePaddle/Paddle/issues/16609, - // will enhance this pass later. - "runtime_context_cache_pass", // + "infer_clean_graph_pass", // "attention_lstm_fuse_pass", // "seqpool_concat_fuse_pass", // "seqconv_eltadd_relu_fuse_pass", // diff --git a/paddle/fluid/inference/tests/api/analyzer_pyramid_dnn_tester.cc b/paddle/fluid/inference/tests/api/analyzer_pyramid_dnn_tester.cc index 9443b0806..1bb06aa21 100644 --- a/paddle/fluid/inference/tests/api/analyzer_pyramid_dnn_tester.cc +++ b/paddle/fluid/inference/tests/api/analyzer_pyramid_dnn_tester.cc @@ -110,6 +110,11 @@ void SetConfig(AnalysisConfig *cfg) { if (FLAGS_zero_copy) { cfg->SwitchUseFeedFetchOps(false); } + // Enable runtime_context_cache_pass, disabled by default since it doesn't + // cover all the cases. + // See detail: https://github.com/PaddlePaddle/Paddle/issues/16609 + // https://github.com/PaddlePaddle/Paddle/issues/16841 + cfg->pass_builder()->AppendPass("runtime_context_cache_pass"); } void SetInput(std::vector> *inputs) { -- GitLab