Skip to content

Conversation

@jeng1220
Copy link
Collaborator

IPlugin*::initialize and IPlugin*::terminate should be always implemented as a pair. Also, resources acquired in IPlugin*::initialize should be released in IPlugin*::terminate. Otherwise, it causes memory leak.

The all data members of cloned plugin must be set in PluginV2::clone. The plugin only calls IPlugin*::initialize once when creating ICudaEngine. The cloned plugin won't call IPlugin*::initialize after IExecutionContext is created, but TensorRT may clone the plugin during the creation of IExecutionContext and use the cloned plugin to infer the model.

Read https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#ipluginext to know more.

`IPlugin*::initialize` and `IPlugin*::terminate` should be always
implemented as a pair. Also, resources acquired in
`IPlugin*::initialize` should be released in `IPlugin*::terminate`.
 Otherwise, it causes memory leak.

The all data members of cloned plugin must be set in
`PluginV2::clone`. The plugin only calls `IPlugin*::initialize`
once when creating ICudaEngine. The cloned plugin won't call
`IPlugin*::initialize` after IExecutionContext is created, but
TensorRT may clone the plugin during the creation of
IExecutionContext and use the cloned plugin to infer the model.

Read https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#ipluginext
to know more.
@jeng1220
Copy link
Collaborator Author

@NHZlX please take a look

@paddle-bot-old
Copy link

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

@jeng1220 jeng1220 added the NVIDIA label Jan 6, 2022
@jeng1220 jeng1220 deleted the bugfix_mem_leak_unsafe_emb_norm_plugin branch January 8, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant