From 4736281c5ce22ecae663896d56b5158da81328c9 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Wed, 30 May 2018 15:16:05 +0800 Subject: [PATCH] restore --- paddle/contrib/inference/paddle_inference_api_impl.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paddle/contrib/inference/paddle_inference_api_impl.cc b/paddle/contrib/inference/paddle_inference_api_impl.cc index bf510620eb1..349bd3b4036 100644 --- a/paddle/contrib/inference/paddle_inference_api_impl.cc +++ b/paddle/contrib/inference/paddle_inference_api_impl.cc @@ -135,11 +135,10 @@ bool PaddlePredictorImpl::Run(const std::vector &inputs, std::unique_ptr PaddlePredictorImpl::Clone() { VLOG(3) << "Predictor::clone"; - std::unique_ptr cls(nullptr); + std::unique_ptr cls(new PaddlePredictorImpl(config_)); if (!cls->InitShared()) { LOG(ERROR) << "fail to call InitShared"; - } else { - cls.reset(new PaddlePredictorImpl(config_)); + return nullptr; } // fix manylinux compile error. return cls; -- GitLab