Skip to content

Conversation

@chilo-ms
Copy link
Contributor

Free memory for cudnn/cublas instances at TRT EP destruction.
#18466

@chilo-ms chilo-ms requested a review from jywu-msft November 16, 2023 07:38
@jywu-msft jywu-msft merged commit 3588fba into main Nov 16, 2023
@jywu-msft jywu-msft deleted the chi/mem_leak_fix branch November 16, 2023 18:23
jywu-msft pushed a commit that referenced this pull request Nov 17, 2023
Free memory for cudnn/cublas instances at TRT EP destruction.
#18466
}

if (external_stream_) {
ORT_IGNORE_RETURN_VALUE(CUBLAS_CALL(cublasDestroy(external_cublas_handle_)));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we store these in class member unique_ptrs (with custom deleter) at the time of creation so that we don't have to remember to destroy them? It looks like this code is repeated in both ~PerThreadContext and ~TensorrtExecutionProvider.
The same applies to this part of the code.

hgaiser pushed a commit to robohouse-delft/onnxruntime that referenced this pull request Nov 23, 2023
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
Free memory for cudnn/cublas instances at TRT EP destruction.
microsoft#18466
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.

4 participants