From 52304889dd16bba95d6501894e668d4c19631a7d Mon Sep 17 00:00:00 2001 From: wenbin Date: Thu, 10 Jun 2021 13:14:33 +0000 Subject: [PATCH] miss if --- 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 e628216a5ed87..e0dc0f72f17dc 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); + } } }