-
Notifications
You must be signed in to change notification settings - Fork 875
update inference c++ API doc #634
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
Conversation
| predictors.emplace_back(std::move(main_predictor)); | ||
| for (int i = 1; i < num_threads; i++) { | ||
| predictors.emplace_back(main_predictor->Clone()); | ||
| } |
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.
150-154行:多线程必须在下面的threads.emplace_back([&, tid] 里面clone,不然设置的SetCpuMathLibraryNumThreads会不生效。
参见:PaddlePaddle/Paddle#15310 PaddlePaddle/Paddle#14543
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.
这个有问题啊。 clone 的时候,main_predictor 已经跑起来了,可能不稳定
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.
目前test里面是这样做的。“可能不稳定”,是指会出现什么情况呢?
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.
main_predictor 里的 scope已经在读写,同时Clone会有多线程。 但预测时scope 的锁是去掉的
|
|
||
| - `NativeConfig` 原生 engine,由 paddle 原生的 forward operator | ||
| 组成,可以天然支持所有paddle 训练出的模型, | ||
| `Config` 有两种,`NativeConfig` 较简单和稳定,`AnalysisConfig` 功能更新,性能更好 |
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.
加句号。
shanyi15
left a comment
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
luotao1
left a comment
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.
#634 (comment) 会在1.4版本修复。
* synchronize with develop (#642) * update_commitid1.3 (#641) * update inference c++ API doc (#634) * update inference c++ API doc * fix link * thorough clean for doc (#644) * thorough clean * delete_DS_Store * Cherrypick1.3 (#652) * thorough clean * delete_DS_Store * [Don't merge now]update_install_doc (#643) * update_install_doc * follow_comments * add maxdepth (#646) * upload_md (#649) * update_version (#650) * Translation of 16 new apis (#651) * fix_windows * Final update 1.3 (#653) * thorough clean * delete_DS_Store * update_1.3 * Deadlink fix (#654) * fix_deadlinks * update_docker * Update release_note.rst * Update index_cn.rst * update_Paddle (#658) * fix pic (#659) * [to 1.3] cn api debug (#655) (#661) * debug * fix 2 -conv2d * "锚" ==> anchor(s)
* synchronize with develop (#642) * update_commitid1.3 (#641) * update inference c++ API doc (#634) * update inference c++ API doc * fix link * thorough clean for doc (#644) * thorough clean * delete_DS_Store * Cherrypick1.3 (#652) * thorough clean * delete_DS_Store * [Don't merge now]update_install_doc (#643) * update_install_doc * follow_comments * add maxdepth (#646) * upload_md (#649) * update_version (#650) * Translation of 16 new apis (#651) * fix_windows * Final update 1.3 (#653) * thorough clean * delete_DS_Store * update_1.3 * Deadlink fix (#654) * fix_deadlinks * update_docker * Update release_note.rst * Update index_cn.rst * update_Paddle (#658) * fix pic (#659) * [to 1.3] cn api debug (#655) (#661) * debug * fix 2 -conv2d * "锚" ==> anchor(s) * Weekly cherrypick0302 (#668) * Update programming_guide.md (#664) * Update programming_guide.md * Update programming_guide_en.md * Update cn api to 1.3 (#663) * Update cn api to 1.3 fluid & layers * Rest to 1.3 * Weeklyupdate 0301 (#666) * Tables_rm_op * update_op * update_index * update_book_0302 (#667) * fix_format (#669) (#670) * fix_format * Update Tables.md * Update Tables_en.md * add dataset api_cn (#673) * rm fluid.core in desigin_idea (#674) * Update fluid_design_idea.md * Update fluid_design_idea_en.md * Fix array_read code example error. (#671) Signed-off-by: zhaoyuchen <[email protected]> * add data_reader_cn (#676) * fix doc error (#675) * update_book_commitid (#680) * update_book_commitid * commitid0309 * fix typo * book indexes (#677)
Uh oh!
There was an error while loading. Please reload this page.