onnxruntime
47072509 - [TensorRT EP] Fix updating provider options from session options (#20246)

Commit
1 year ago
[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.
Author
Parents
Loading