Avoid trt deprecated api warnings shown as errors during ORT-TRT build#16035
Avoid trt deprecated api warnings shown as errors during ORT-TRT build#16035
Conversation
|
You should check the header file to see the function declarations, for example TensorRT-8.6.1.6/include/NvInferRuntimePlugin.h in the tar file, you will see the function is deprecated as |
The header file in docker trt pkg is the same as the one in trt tar binaries. |
okay, we can investigate it later. |
Building under windows has no issue |
Description
Avoid trt deprecated api warnings shown as errors when building onnxruntime_test_all
This issue is only visible when installing trt via binaries, rather than deb/rpm pkg (CI pipelines)
The change is similar to existing set_property for onnxruntime_providers_tensorrt
onnxruntime/cmake/onnxruntime_providers.cmake
Line 421 in 89ea503
Motivation and Context
onnxruntime/test/unittest_main/test_main.cc includes nvinfer.h, which includes deprecated trt apis and and generates warnings.
When building onnxruntime_test_all, it will show warnings as errors and block the build.
Doubts
Although this issue is visible on trt tar binaries but not on trt deb/rpm pkgs,
Their file size&hash are the same (creation time vary), regarding headers/libs installing in different ways.