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

trt plugin upgrade to pluginv2ext #31670

Merged
merged 7 commits into from
Mar 23, 2021
Merged

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Mar 16, 2021

PR types

Others

PR changes

Others

Describe

背景:
nvidia 对 trt IPluginV1早已不再维护,并且推荐用户使用IPluginV2
IPluginExt不支持clone接口,如果多线程用到trt plugin,可能会产生计算错误

修改:
新增PluginTensorRTV2,按需将有问题的plugin升级成v2版本,并删除旧有的v1版本,可按需替换。plugin修改后,还需对应修改converter。

结果:
修复了paddle-trt多线程下用到split plugin时计算结果错误的问题.

@jiweibo jiweibo closed this Mar 18, 2021
@jiweibo jiweibo reopened this Mar 18, 2021
Copy link
Member

@shangzhizhou shangzhizhou left a comment

Choose a reason for hiding this comment

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

LGTM

nvinfer1::IPluginV2Layer* AddPluginV2Ext(nvinfer1::ITensor* const* inputs,
int num_inputs,
plugin::PluginTensorRTV2Ext* plugin);

Copy link
Member

Choose a reason for hiding this comment

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

把原来的AddPluginV2改为AddPluginV2DynamicExt把,方便区分。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,下个pr统一修复

@jiweibo jiweibo merged commit f4d9212 into PaddlePaddle:develop Mar 23, 2021
@jiweibo jiweibo deleted the trt_plugin_v2 branch March 23, 2021 07:11
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.

2 participants