Skip to content

Commit

Permalink
[Paddle Inference]support collect shape in API run([input1, input2...…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutianzi666 authored Sep 20, 2023
1 parent 95da913 commit feddd55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,10 @@ bool AnalysisPredictor::Run(const std::vector<PaddleTensor> &inputs,
}
#endif

if (config_.shape_range_info_collected()) {
HookCollectShapeRangeInfo();
}

// Run the inference program
// if share variables, we need not create variables
executor_->Run();
Expand Down Expand Up @@ -1166,6 +1170,10 @@ bool AnalysisPredictor::Run(const std::vector<paddle::Tensor> &inputs,
}
#endif

if (config_.shape_range_info_collected()) {
HookCollectShapeRangeInfo();
}

// Run the inference program
// if share variables, we need not create variables
executor_->Run();
Expand Down

0 comments on commit feddd55

Please sign in to comment.