Skip to content

Comments

[TRT EP] Fix trt context memory sharing#24784

Merged
jywu-msft merged 5 commits intomicrosoft:mainfrom
toothache:fix_trt_ctx_mem
May 20, 2025
Merged

[TRT EP] Fix trt context memory sharing#24784
jywu-msft merged 5 commits intomicrosoft:mainfrom
toothache:fix_trt_ctx_mem

Conversation

@toothache
Copy link
Member

@toothache toothache commented May 16, 2025

Description

Fixed a TRT context memory sharing bug where the context memory was assigned to a unique_ptr that was immediately destructed upon leaving scope.

Motivation and Context

The bug seems to be introduced by a refactor work: #15833 :

image

@toothache
Copy link
Member Author

@yf711 @chilo-ms , may I get a review for this change? Thanks!

@jywu-msft jywu-msft requested a review from chilo-ms May 20, 2025 02:50
@tianleiwu
Copy link
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows x64 QNN CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@chilo-ms
Copy link
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows x64 QNN CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@jywu-msft jywu-msft merged commit adeb016 into microsoft:main May 20, 2025
82 checks passed
@jywu-msft
Copy link
Member

@chilo-ms can you help double check if this same issue is there on NV RTX EP?

@chilo-ms
Copy link
Contributor

@chilo-ms can you help double check if this same issue is there on NV RTX EP?

@ankan-ban @ishwar-raut1 @gedoensmax @gaugarg-nv
Please see this TRT context memory sharing bug and fix in TRT EP.
Even though NV RTX EP for now doesn't expose TRT context memory sharing option, you might need the fix later.

quic-ankus pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Nov 25, 2025
### Description
<!-- Describe your changes. -->

Fixed a TRT context memory sharing bug where the context memory was
assigned to a unique_ptr that was immediately destructed upon leaving
scope.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

The bug seems to be introduced by a refactor work: microsoft#15833 :


![image](https://github.com/user-attachments/assets/eec0e363-b6b1-4831-9ee4-a1b3ed45116c)
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