-
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
delay tensorrt registry #45824
delay tensorrt registry #45824
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
1dcff4f
to
586dacb
Compare
} | ||
bool Regist(const std::string& name, std::function<void()> func) { | ||
map.emplace(name, func); | ||
return true; |
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.
返回值的语义是什么?什么时候会返回 false?
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.
为了在 namespace 里调用该函数,创建了一个 UNUSED 变量
static TrtPluginRegistry registry; | ||
return ®istry; | ||
} | ||
bool Regist(const std::string& name, std::function<void()> func) { |
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.
func 为什么不传引用?
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.
DONE
return true; | ||
} | ||
void RegistToTrt() { | ||
for (auto it : map) { |
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.
by reference
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.
DONE
PR types
Others
PR changes
Others
Describe
延后 tensorrt 的库文件检查:只有当要使用 tensorrt 时再注册 plugin。