File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
paddle/fluid/inference/api Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,10 @@ void AnalysisPredictor::OptimizeInferenceProgram() {
477
477
template <>
478
478
std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
479
479
AnalysisConfig, PaddleEngineKind::kAnalysis >(const AnalysisConfig &config) {
480
+ if (config.glog_info_disabled ()) {
481
+ FLAGS_logtostderr = 1 ;
482
+ FLAGS_minloglevel = 2 ; // GLOG_ERROR
483
+ }
480
484
VLOG (3 ) << " create AnalysisConfig" ;
481
485
PADDLE_ENFORCE (config.is_valid (),
482
486
" Note: Each config can only be used for one predictor." );
@@ -508,11 +512,6 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
508
512
framework::InitGflags (flags);
509
513
}
510
514
}
511
- framework::InitGLOG (" " );
512
- if (config.glog_info_disabled ()) {
513
- FLAGS_logtostderr = 1 ;
514
- FLAGS_minloglevel = 2 ; // GLOG_ERROR
515
- }
516
515
517
516
std::unique_ptr<PaddlePredictor> predictor (new AnalysisPredictor (config));
518
517
// Each config can only be used for one predictor.
You can’t perform that action at this time.
0 commit comments