mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-23 02:38:28 +00:00
### Description Fix the nullptr check so that it would check the actual existence of engine/context (Currently, it checks the address of unique_ptr, which is always not null. Thx @jslhcl for pointing that out) > A quick recall of struct [trt_state](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.h#L104): > ``` > std::unique_ptr<nvinfer1::ICudaEngine>* engine = nullptr; >std::unique_ptr<nvinfer1::IExecutionContext>* context = nullptr; >``` ### Motivation and Context https://github.com/microsoft/onnxruntime/issues/15982 The incorrect check couldn't stop TRT EP from loading incompatible engine cache on purpose, which invokes unhandled exception |
||
|---|---|---|
| .. | ||
| contrib_ops | ||
| core | ||
| python | ||
| test | ||
| tool/etw | ||
| wasm | ||
| __init__.py | ||
| ReformatSource.ps1 | ||
| ReformatSourcePython.bat | ||
| VSCodeCoverage.runsettings | ||