提交 47d9f64f 编写于 作者: Q qiaolongfei

PaddlePredictorImpl::Clone return unique_ptr

上级 ad0bebd5
......@@ -135,10 +135,11 @@ bool PaddlePredictorImpl::Run(const std::vector<PaddleTensor> &inputs,
std::unique_ptr<PaddlePredictor> PaddlePredictorImpl::Clone() {
VLOG(3) << "Predictor::clone";
std::unique_ptr<PaddlePredictor> cls(new PaddlePredictorImpl(config_));
std::unique_ptr<PaddlePredictor> cls(nullptr);
if (!cls->InitShared()) {
LOG(ERROR) << "fail to call InitShared";
return nullptr;
} else {
cls.reset(new PaddlePredictorImpl(config_));
}
// fix manylinux compile error.
return cls;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册