From f7034613f7be66c3b2a7fb5720d40e74cdca811a Mon Sep 17 00:00:00 2001 From: wenbin Date: Tue, 15 Jun 2021 08:49:59 +0800 Subject: [PATCH] refix if-else logic for inference: missing if (#33531) --- paddle/fluid/inference/api/analysis_predictor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index baff7a6f57c..42793595e19 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -303,7 +303,9 @@ static void DisablePrepareDataOpt( disable_opt || pre_disable_opt); } // disable prepare data if unfriendly op is found - disable_opt = IsPrepareDataOptTargetOp(op); + if (!disable_opt) { + disable_opt = IsPrepareDataOptTargetOp(op); + } } } -- GitLab