Skip to content

Commit 4cddd06

Browse files
committed
Add TensorRT execution provider support
This commit adds support for the ONNX Runtime TensorRT execution provider, including detection in CMake, new localization strings, and integration in background and enhance filters. It also updates session creation logic to handle TensorRT-specific options and cache management.
1 parent 5e0233b commit 4cddd06

19 files changed

+82
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,17 @@ if(HAVE_ONNXRUNTIME_ROCM_EP)
183183
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE HAVE_ONNXRUNTIME_ROCM_EP)
184184
endif()
185185

186+
check_library_exists(
187+
onnxruntime::onnxruntime
188+
OrtSessionOptionsAppendExecutionProvider_Tensorrt
189+
onnxruntime_c_api.h
190+
HAVE_ONNXRUNTIME_TENSORRT_EP
191+
)
192+
if(HAVE_ONNXRUNTIME_TENSORRT_EP)
193+
message(STATUS "ONNX Runtime TensorRT Execution Provider found")
194+
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE HAVE_ONNXRUNTIME_TENSORRT_EP)
195+
endif()
196+
186197
target_sources(
187198
${CMAKE_PROJECT_NAME}
188199
PRIVATE

data/locale/ar-EG.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="جهاز الإستدلال"
99
CPU="وحدة المعالجة المركزية"
1010
GPUCUDA="الوحدة المركزية - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="نموذج التقسيم"
1415
SINet="SINet"

data/locale/bn-IN.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="নিখরচনা ডিভাইস"
99
CPU="সিপিইউ"
1010
GPUCUDA="জিপিইউ - কুড়া"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="কোরএমএল"
1314
SegmentationModel="সেগমেন্টেশন মডেল"
1415
SINet="এসআইনেট"

data/locale/en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="Inference device"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="Segmentation model"
1415
SINet="SINet"

data/locale/es-SP.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="Dispositivo de inferencia"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="Modelo de segmentación"
1415
SINet="SINet"

data/locale/fr-FR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="Dispositif d'inférence"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="Modèle de segmentation"
1415
SINet="SINet"

data/locale/hi-IN.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="संदर्भ डिवाइस"
99
CPU="सीपीयू"
1010
GPUCUDA="जीपीयू - क्यूडा"
1111
GPUROCM="जीपीयू - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="कोरएमएल"
1314
SegmentationModel="सेगमेंटेशन मॉडल"
1415
SINet="ऐसआईनेट"

data/locale/it-IT.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="Dispositivo di inferenza"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="Modello di segmentazione".
1415
SINet="SINet"

data/locale/ja-JP.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="推論デバイス"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="セグメンテーションモデル"
1415
SINet="SINet"

data/locale/ko-KR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ InferenceDevice="추론 장치"
99
CPU="CPU"
1010
GPUCUDA="GPU - CUDA"
1111
GPUROCM="GPU - ROCM"
12+
TENSORRT="TensorRT"
1213
CoreML="CoreML"
1314
SegmentationModel="세분화 모델"
1415
SINet="SINet"

0 commit comments

Comments
 (0)