|
72 | 72 | endif()
|
73 | 73 |
|
74 | 74 | # TensorRT 10 GA onwards, the TensorRT libraries will have major version appended to the end on Windows,
|
75 |
| - # for example, nvinfer_10.dll, nvinfer_plugin_10.dll, nvonnxparser_10.dll ... |
| 75 | + # for example, nvinfer_10.dll, nvonnxparser_10.dll ... |
76 | 76 | if (WIN32 AND TRT_GREATER_OR_EQUAL_TRT_10_GA)
|
77 | 77 | set(NVINFER_LIB "nvinfer_${NV_TENSORRT_MAJOR}")
|
78 |
| - set(NVINFER_PLUGIN_LIB "nvinfer_plugin_${NV_TENSORRT_MAJOR}") |
79 | 78 | set(PARSER_LIB "nvonnxparser_${NV_TENSORRT_MAJOR}")
|
80 | 79 | endif()
|
81 | 80 |
|
82 | 81 | if (NOT NVINFER_LIB)
|
83 | 82 | set(NVINFER_LIB "nvinfer")
|
84 | 83 | endif()
|
85 | 84 |
|
86 |
| - if (NOT NVINFER_PLUGIN_LIB) |
87 |
| - set(NVINFER_PLUGIN_LIB "nvinfer_plugin") |
88 |
| - endif() |
89 |
| - |
90 | 85 | if (NOT PARSER_LIB)
|
91 | 86 | set(PARSER_LIB "nvonnxparser")
|
92 | 87 | endif()
|
93 | 88 |
|
94 |
| - MESSAGE(STATUS "Looking for ${NVINFER_LIB} and ${NVINFER_PLUGIN_LIB}") |
| 89 | + MESSAGE(STATUS "Looking for ${NVINFER_LIB}") |
95 | 90 |
|
96 | 91 | find_library(TENSORRT_LIBRARY_INFER ${NVINFER_LIB}
|
97 | 92 | HINTS ${TENSORRT_ROOT}
|
|
101 | 96 | MESSAGE(STATUS "Can't find ${NVINFER_LIB}")
|
102 | 97 | endif()
|
103 | 98 |
|
104 |
| - find_library(TENSORRT_LIBRARY_INFER_PLUGIN ${NVINFER_PLUGIN_LIB} |
105 |
| - HINTS ${TENSORRT_ROOT} |
106 |
| - PATH_SUFFIXES lib lib64 lib/x64) |
107 |
| - |
108 |
| - if (NOT TENSORRT_LIBRARY_INFER_PLUGIN) |
109 |
| - MESSAGE(STATUS "Can't find ${NVINFER_PLUGIN_LIB}") |
110 |
| - endif() |
111 |
| - |
112 | 99 | if (onnxruntime_USE_TENSORRT_BUILTIN_PARSER)
|
113 | 100 | MESSAGE(STATUS "Looking for ${PARSER_LIB}")
|
114 | 101 |
|
|
120 | 107 | MESSAGE(STATUS "Can't find ${PARSER_LIB}")
|
121 | 108 | endif()
|
122 | 109 |
|
123 |
| - set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER} ${TENSORRT_LIBRARY_INFER_PLUGIN} ${TENSORRT_LIBRARY_NVONNXPARSER}) |
| 110 | + set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER} ${TENSORRT_LIBRARY_NVONNXPARSER}) |
124 | 111 | MESSAGE(STATUS "Find TensorRT libs at ${TENSORRT_LIBRARY}")
|
125 | 112 | else()
|
126 | 113 | if (TRT_GREATER_OR_EQUAL_TRT_10_GA)
|
|
153 | 140 | endif()
|
154 | 141 | # Static libraries are just nvonnxparser_static on all platforms
|
155 | 142 | set(onnxparser_link_libs nvonnxparser_static)
|
156 |
| - set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER} ${TENSORRT_LIBRARY_INFER_PLUGIN}) |
| 143 | + set(TENSORRT_LIBRARY ${TENSORRT_LIBRARY_INFER}) |
157 | 144 | MESSAGE(STATUS "Find TensorRT libs at ${TENSORRT_LIBRARY}")
|
158 | 145 | endif()
|
159 | 146 |
|
160 | 147 | # ${TENSORRT_LIBRARY} is empty if we link nvonnxparser_static.
|
161 | 148 | # nvonnxparser_static is linked against tensorrt libraries in onnx-tensorrt
|
162 | 149 | # See https://github.com/onnx/onnx-tensorrt/blob/8af13d1b106f58df1e98945a5e7c851ddb5f0791/CMakeLists.txt#L121
|
163 | 150 | # However, starting from TRT 10 GA, nvonnxparser_static doesn't link against tensorrt libraries.
|
164 |
| - # Therefore, the above code finds ${TENSORRT_LIBRARY_INFER} and ${TENSORRT_LIBRARY_INFER_PLUGIN}. |
| 151 | + # Therefore, the above code finds ${TENSORRT_LIBRARY_INFER}. |
165 | 152 | if(onnxruntime_CUDA_MINIMAL)
|
166 | 153 | set(trt_link_libs ${CMAKE_DL_LIBS} ${TENSORRT_LIBRARY})
|
167 | 154 | else()
|
|
0 commit comments