Skip to content

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

Merged
chilo-ms merged 11 commits intomainfrom
chi/trt_ep_custom_op_list_mem_leak_fix
Jan 25, 2024
Merged

[TensorRT EP] Fix mem leak for TRT plugins custom ops#19248
chilo-ms merged 11 commits intomainfrom
chi/trt_ep_custom_op_list_mem_leak_fix

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
@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.
@snnn
Copy link
Contributor

snnn commented Sep 5, 2025

This PR has been cherry-picked into the rel-1.17.0 branch in PR #19243. Removing the release:1.17.0 label.

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.

3 participants