-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compile error on mac caused by std move #11034
Fix compile error on mac caused by std move #11034
Conversation
@@ -135,13 +135,14 @@ 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_)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will make mac success but make manylinux fail.
try return pointer, that mac works and might make manylinux success.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many codes in fluid return a unique_ptr without the problem. Not sure why this place face problem on manylinux build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix: #11032
it's strange why CreatePaddlePredictorImpl do not have the same problem on manylinux
Paddle/paddle/contrib/inference/paddle_inference_api_impl.cc
Lines 287 to 308 in 654f5d3