未验证 提交 20d61414 编写于 作者: P Pei Yang 提交者: GitHub

fix glog warning, test=develop (#21573)

上级 657053f2
...@@ -478,6 +478,10 @@ void AnalysisPredictor::OptimizeInferenceProgram() { ...@@ -478,6 +478,10 @@ void AnalysisPredictor::OptimizeInferenceProgram() {
template <> template <>
std::unique_ptr<PaddlePredictor> CreatePaddlePredictor< std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
AnalysisConfig, PaddleEngineKind::kAnalysis>(const AnalysisConfig &config) { AnalysisConfig, PaddleEngineKind::kAnalysis>(const AnalysisConfig &config) {
if (config.glog_info_disabled()) {
FLAGS_logtostderr = 1;
FLAGS_minloglevel = 2; // GLOG_ERROR
}
VLOG(3) << "create AnalysisConfig"; VLOG(3) << "create AnalysisConfig";
PADDLE_ENFORCE(config.is_valid(), PADDLE_ENFORCE(config.is_valid(),
"Note: Each config can only be used for one predictor."); "Note: Each config can only be used for one predictor.");
...@@ -509,11 +513,6 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor< ...@@ -509,11 +513,6 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
framework::InitGflags(flags); framework::InitGflags(flags);
} }
} }
framework::InitGLOG("");
if (config.glog_info_disabled()) {
FLAGS_logtostderr = 1;
FLAGS_minloglevel = 2; // GLOG_ERROR
}
std::unique_ptr<PaddlePredictor> predictor(new AnalysisPredictor(config)); std::unique_ptr<PaddlePredictor> predictor(new AnalysisPredictor(config));
// Each config can only be used for one predictor. // Each config can only be used for one predictor.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册