-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TensorRT EP] Fix updating provider options from session options (#20246
) The issue comes from if user specifies a path for "ep.context_file_path" in session options, due to `context_cache_path` is a local variable and it will be destroyed when returning from `UpdateOrtTensorRTProviderOptionsV2FromSessionOptionsConfigs()`. Later in `onnxruntime::TensorrtProviderFactoryCreator::Create(&new_tensorrt_options)`, it will access the corrupted memory location because of the location is saved via context_cache_path.c_str(). Inline the `UpdateOrtTensorRTProviderOptionsV2FromSessionOptionsConfigs()` can fix this issue.
- Loading branch information
Showing
1 changed file
with
26 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters