onnxruntime/onnxruntime
Yifan Li 9426bd50cb
[TensorRT EP] Update deprecated TRT api (#18834)
### Description
<!-- Describe your changes. -->
Update deprecated TRT api:
1.
[setMaxWorkspaceSize](https://docs.nvidia.com/deeplearning/tensorrt/api/c_api/classnvinfer1_1_1_i_builder_config.html#a8209999988ab480c60c8a905dfd2654d)(max_workspace_size_)-------->setMemoryPoolLimit(nvinfer1::MemoryPoolType::kWORKSPACE,
max_workspace_size_)
2.
[kENABLE_TACTIC_HEURISTIC](https://docs.nvidia.com/deeplearning/tensorrt/api/c_api/namespacenvinfer1.html#abdc74c40fe7a0c3d05d2caeccfbc29c1a1215692ad24465e4d9e37a8a7fce1a38)-------->supersede
by trt builder optimization level 2

Perf & warning log comparison
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=ProgId content=OneNote.File>
<meta name=Generator content="Microsoft OneNote 15">
</head>

<body lang=en-US style='font-family:"Microsoft YaHei";font-size:12.0pt'>
<!--StartFragment-->

<div style='direction:ltr'>


TRT EP options | User will see corresponding warning logs: | Average
inference time cost (FRCNN on A100)
-- | -- | --
trt_build_heuristics_enable\|true | [TensorRT EP]
trt_build_heuristics_enable is deprecated on TRT 8.6 onwards. Please set
builder optimization level as 2 to enable builder heuristics. | ~300ms
trt_build_heuristics_enable\|true   trt_builder_optimization_level\|2 |
[TensorRT EP] Builder heuristics are enabled automatically by builder
optimization level 2. trt_build_heuristics_enable is deprecated on TRT
8.6 onwards. | ~275ms
trt_builder_optimization_level\|2 |   | ~275ms



</div>

<!--EndFragment-->
</body>

</html>




### 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. -->
Prepare for upcoming TRT 10
2023-12-18 09:16:09 -08:00
..
contrib_ops Replace some ORT_ENFORCE with ORT_THROW_IF_ERROR (#18812) 2023-12-14 10:14:22 -08:00
core [TensorRT EP] Update deprecated TRT api (#18834) 2023-12-18 09:16:09 -08:00
python [VitisAI] 1. api compatbile 2. dynamic load onnx (#18470) 2023-12-14 14:43:41 -08:00
test Build function bodies according to the imported global opset. (#18833) 2023-12-15 15:56:20 -08:00
tool/etw
wasm [js/web/training] Add CreateTrainingSession (#17891) 2023-10-26 09:22:10 -07:00
__init__.py Removed all the deprecated python training code and related tests and utils (#18333) 2023-11-17 18:19:21 -08:00
ReformatSource.ps1
ReformatSourcePython.bat
VSCodeCoverage.runsettings