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

[TensorRT EP] Fix mem leak for TRT plugins custom ops #19248

Merged
merged 11 commits into from
Jan 25, 2024

Conversation

chilo-ms
Copy link
Contributor

@chilo-ms chilo-ms commented Jan 23, 2024

Old TRT EP's GetTensorRTCustomOpDomainList() will create vector of OrtCustomOpDomain objects and release the ownership of those objects. But, those objects are never being released.
Use the static unique_ptr to make sure those custom op objects are properly released.

@chilo-ms chilo-ms merged commit a2867b9 into main Jan 25, 2024
98 checks passed
@chilo-ms chilo-ms deleted the chi/trt_ep_custom_op_list_mem_leak_fix branch January 25, 2024 19:51
YUNQIUGUO pushed a commit that referenced this pull request Jan 25, 2024
TRT EP's GetTensorRTCustomOpDomainList() will create vector of
OrtCustomOpDomain objects and release the ownership of those objects.
But, thoses objects are not released forever.
In session level, we need to make TRT EP remember what OrtCustomOpDomain
objects it created and release them at EP destruction time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants