-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Paddle Inference] Predictor support paddle::Tensor #50445
[Paddle Inference] Predictor support paddle::Tensor #50445
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
b511447
to
b3796f3
Compare
fd31565
to
c28e71b
Compare
8e0b229
to
a293262
Compare
abcfadd
to
335898b
Compare
335898b
to
d6997ff
Compare
16a7db5
to
0736089
Compare
…hi_tensor_for_inference
0736089
to
6d06b4e
Compare
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 for ut rename
…hi_tensor_for_inference
2151a34
to
2296742
Compare
LOG(ERROR) << "fail to get fetches"; | ||
return false; | ||
} | ||
VLOG(3) << "predict cost: " << timer.toc() << "ms"; |
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.
异步情况下不加sync耗时统计有问题吧
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.
异步情况下不加sync耗时统计有问题吧
对,需要加同步,准备放在getfetch内部
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.
异步情况下不加sync耗时统计有问题吧
讨论后不加同步了。paddle::Tensor有copy_to(c++)或to_tensor接口做这样的工作~
…hi_tensor_for_inference
@@ -1037,6 +1048,73 @@ bool AnalysisPredictor::Run(const std::vector<PaddleTensor> &inputs, | |||
return true; | |||
} | |||
|
|||
bool AnalysisPredictor::Run(const std::vector<paddle::Tensor> &inputs, | |||
std::vector<paddle::Tensor> *outputs) { |
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.
和上面Run接口,重复的实现内容能否被复用?
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.
和上面Run接口,重复的实现内容能否被复用?
想过抽出公共代码出来,但感觉抽出来的代码没有清晰的作用
@@ -83,7 +83,7 @@ else() | |||
if(WITH_MKL) | |||
set(FLAG_OPENMP "-fopenmp") | |||
endif() | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${FLAG_OPENMP}") | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 ${FLAG_OPENMP}") |
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 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.
这里升级对其他是否有影响?
会影响到paddle-inference-demo中的cmakelists文件设置,已经提pr改过了。
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.
主要review了对应了API文档。目前却Go和C的文档
PR types
New features
PR changes
APIs
Describe
docs ref to 链接.
TODO:
NOTES: