-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [onnxruntime] create 'tensorrt' feature * ci: test onnxruntime[tensorrt] in hosted runner * [onnxruntime] create a patch for the feature * [onnxruntime] create 'openvino' feature * [onnxruntime] create 'directml' feature * ci: remove onnxruntime[directml]
- Loading branch information
Showing
4 changed files
with
106 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/cmake/onnxruntime_providers_tensorrt.cmake b/cmake/onnxruntime_providers_tensorrt.cmake | ||
index e56de0c..0ab5e1e 100644 | ||
--- a/cmake/onnxruntime_providers_tensorrt.cmake | ||
+++ b/cmake/onnxruntime_providers_tensorrt.cmake | ||
@@ -8,8 +8,13 @@ | ||
set(BUILD_LIBRARY_ONLY 1) | ||
add_definitions("-DONNX_ML=1") | ||
add_definitions("-DONNX_NAMESPACE=onnx") | ||
- set(CUDA_INCLUDE_DIRS ${CUDAToolkit_INCLUDE_DIRS}) | ||
- set(TENSORRT_ROOT ${onnxruntime_TENSORRT_HOME}) | ||
+ if(DEFINED onnxruntime_TENSORRT_HOME) | ||
+ set(TENSORRT_ROOT ${onnxruntime_TENSORRT_HOME}) | ||
+ else() | ||
+ find_package(CUDAToolkit REQUIRED) | ||
+ get_filename_component(TENSORRT_ROOT "${CUDAToolkit_LIBRARY_ROOT}" ABSOLUTE) | ||
+ message(STATUS "Guessing TensorRT with CUDAToolkit_LIBRARY_ROOT: ${TENSORRT_ROOT}") | ||
+ endif() | ||
set(OLD_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) | ||
set(PROTOBUF_LIBRARY ${PROTOBUF_LIB}) | ||
if (WIN32) | ||
@@ -30,7 +35,7 @@ | ||
# There is an issue when running "Debug build" TRT EP with "Release build" TRT builtin parser on Windows. | ||
# We enforce following workaround for now until the real fix. | ||
if (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
- set(onnxruntime_USE_TENSORRT_BUILTIN_PARSER OFF) | ||
+ # set(onnxruntime_USE_TENSORRT_BUILTIN_PARSER OFF) | ||
MESSAGE(STATUS "[Note] There is an issue when running \"Debug build\" TRT EP with \"Release build\" TRT built-in parser on Windows. This build will use tensorrt oss parser instead.") | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
{ | ||
"name": "onnxruntime", | ||
"features": [ | ||
"cuda" | ||
"cuda", | ||
"tensorrt" | ||
] | ||
} | ||
] | ||
|