diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index 2c1e6ba95dd0d7a6e95267c43bf50141c44c5d8c..a5526c7443e7d6e761dc13f56bbdb9c734d6b452 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -1362,7 +1362,10 @@ void AnalysisPredictor::OptimizeInferenceProgram() { // The config and argument take a lot of storage, // when the predictor settings are complete, we release these stores. config_.PartiallyRelease(); +#if defined(PADDLE_WITH_TESTING) fusion_statis_ = *argument_->fusion_statis_ptr(); +#endif + #if defined(_WIN32) argument_->PartiallyRelease(); #else