Skip to content
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

delay tensorrt registry #45824

Merged
merged 5 commits into from
Sep 14, 2022

Conversation

JZZ-NOTE
Copy link
Contributor

@JZZ-NOTE JZZ-NOTE commented Sep 7, 2022

PR types

Others

PR changes

Others

Describe

延后 tensorrt 的库文件检查:只有当要使用 tensorrt 时再注册 plugin。

@paddle-bot
Copy link

paddle-bot bot commented Sep 7, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

}
bool Regist(const std::string& name, std::function<void()> func) {
map.emplace(name, func);
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返回值的语义是什么?什么时候会返回 false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为了在 namespace 里调用该函数,创建了一个 UNUSED 变量

static TrtPluginRegistry registry;
return &registry;
}
bool Regist(const std::string& name, std::function<void()> func) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func 为什么不传引用?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

return true;
}
void RegistToTrt() {
for (auto it : map) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by reference

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

@paddle-bot-old paddle-bot-old bot added the contributor External developers label Sep 13, 2022
@qingqing01 qingqing01 merged commit d7d35ff into PaddlePaddle:develop Sep 14, 2022
@paddle-bot-old paddle-bot-old bot removed the contributor External developers label Sep 15, 2022
@JZZ-NOTE JZZ-NOTE deleted the jzz_delay_tensorrt_registry branch March 8, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants