Skip to content

[Paddle-TRT] potential memory leak #24107

@jeng1220

Description

@jeng1220

IPlugin*::initialize and IPlugin*::terminate should be always implemented as a pair. Also, resources acquired (e.g. malloc, new *, cuadMalloc*, *Create*, etc) in IPlugin*::initialize should be released in IPlugin*::terminate. Otherwise, it causes memory leak.

I fix a plugin as example, see #24106. Following plugins have the same bug at least:

  • InstanceNormPlugin
  • PReluPlugin
  • SkipLayerNormPluginDynamic

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions