Skip to content

Commit 4736281

Browse files
committed
restore
1 parent 47d9f64 commit 4736281

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

paddle/contrib/inference/paddle_inference_api_impl.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,10 @@ bool PaddlePredictorImpl::Run(const std::vector<PaddleTensor> &inputs,
135135

136136
std::unique_ptr<PaddlePredictor> PaddlePredictorImpl::Clone() {
137137
VLOG(3) << "Predictor::clone";
138-
std::unique_ptr<PaddlePredictor> cls(nullptr);
138+
std::unique_ptr<PaddlePredictor> cls(new PaddlePredictorImpl(config_));
139139
if (!cls->InitShared()) {
140140
LOG(ERROR) << "fail to call InitShared";
141-
} else {
142-
cls.reset(new PaddlePredictorImpl(config_));
141+
return nullptr;
143142
}
144143
// fix manylinux compile error.
145144
return cls;

0 commit comments

Comments
 (0)