Skip to content

Commit 574ae9a

Browse files
cyyeverpytorchmergebot
authored andcommitted
[Submodule] Remove third-party onnx-tensorrt (pytorch#126542)
It seems that tensorrt is not used by the C++ code, may be due to the removal of Caffe2. Pull Request resolved: pytorch#126542 Approved by: https://github.com/ezyang
1 parent 853081a commit 574ae9a

File tree

7 files changed

+0
-49
lines changed

7 files changed

+0
-49
lines changed

.gitmodules

-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@
5858
ignore = dirty
5959
path = third_party/onnx
6060
url = https://github.com/onnx/onnx.git
61-
[submodule "third_party/onnx-tensorrt"]
62-
ignore = dirty
63-
path = third_party/onnx-tensorrt
64-
url = https://github.com/onnx/onnx-tensorrt
6561
[submodule "third_party/sleef"]
6662
ignore = dirty
6763
path = third_party/sleef

CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ option(USE_PYTORCH_QNNPACK "Use ATen/QNNPACK (quantized 8-bit operators)" ON)
265265
option(USE_SNPE "Use Qualcomm's SNPE library" OFF)
266266
option(USE_SYSTEM_EIGEN_INSTALL
267267
"Use system Eigen instead of the one under third_party" OFF)
268-
option(USE_TENSORRT "Using Nvidia TensorRT library" OFF)
269268
cmake_dependent_option(
270269
USE_VALGRIND "Use Valgrind. Only available on Linux." ON
271270
"LINUX" OFF)

WORKSPACE

-5
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,4 @@ local_repository(
355355
path = "third_party/onnx/third_party/benchmark",
356356
)
357357

358-
local_repository(
359-
name = "unused_onnx_tensorrt_benchmark",
360-
path = "third_party/onnx-tensorrt/third_party/onnx/third_party/benchmark",
361-
)
362-
363358
### Unused repos end

caffe2/core/macros.h.in

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#cmakedefine USE_MKLDNN
2626
#cmakedefine CAFFE2_USE_NVTX
2727
#cmakedefine CAFFE2_USE_ITT
28-
#cmakedefine CAFFE2_USE_TRT
2928

3029
#ifndef EIGEN_MPL2_ONLY
3130
#cmakedefine EIGEN_MPL2_ONLY
@@ -67,7 +66,6 @@
6766
{"USE_MKLDNN", "${USE_MKLDNN}"}, \
6867
{"USE_NVTX", "${CAFFE2_USE_NVTX}"}, \
6968
{"USE_ITT", "${CAFFE2_USE_ITT}"}, \
70-
{"USE_TRT", "${CAFFE2_USE_TRT}"}, \
7169
{"USE_ROCM_KERNEL_ASSERT", "${USE_ROCM_KERNEL_ASSERT}"}, \
7270
{"USE_CUSPARSELT", "${USE_CUSPARSELT}"}, \
7371
}

cmake/Caffe2Config.cmake.in

-7
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ if(@USE_CUDA@)
7979
# If Caffe2 was compiled with the libraries below, they must
8080
# be found again when including the Caffe2 target.
8181
set(CAFFE2_USE_CUDA @USE_CUDA@)
82-
set(CAFFE2_USE_TENSORRT @USE_TENSORRT@)
8382

8483
# Add current directory to module path so we pick up FindCUDAToolkit.cmake
8584
set(old_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
@@ -93,12 +92,6 @@ if(@USE_CUDA@)
9392
"libraries. Please set the proper CUDA prefixes and / or install "
9493
"CUDA.")
9594
endif()
96-
if(@CAFFE2_USE_TENSORRT@ AND NOT CAFFE2_USE_TENSORRT)
97-
message(FATAL_ERROR
98-
"Your installed Caffe2 version uses TensorRT but I cannot find the TensorRT "
99-
"libraries. Please set the proper TensorRT prefixes and / or install "
100-
"TensorRT.")
101-
endif()
10295
endif()
10396

10497
if(@USE_XPU@)

cmake/Dependencies.cmake

-29
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ if(USE_CUDA)
4040
set(CAFFE2_USE_CUDNN ${USE_CUDNN})
4141
set(CAFFE2_USE_CUSPARSELT ${USE_CUSPARSELT})
4242
set(CAFFE2_USE_NVRTC ${USE_NVRTC})
43-
set(CAFFE2_USE_TENSORRT ${USE_TENSORRT})
4443
include(${CMAKE_CURRENT_LIST_DIR}/public/cuda.cmake)
4544
if(CAFFE2_USE_CUDA)
4645
# A helper variable recording the list of Caffe2 dependent libraries
@@ -63,11 +62,6 @@ if(USE_CUDA)
6362
else()
6463
caffe2_update_option(USE_CUSPARSELT OFF)
6564
endif()
66-
if(CAFFE2_USE_TENSORRT)
67-
list(APPEND Caffe2_PUBLIC_CUDA_DEPENDENCY_LIBS caffe2::tensorrt)
68-
else()
69-
caffe2_update_option(USE_TENSORRT OFF)
70-
endif()
7165
find_program(SCCACHE_EXECUTABLE sccache)
7266
if(SCCACHE_EXECUTABLE)
7367
# Using RSP/--options-file renders output noncacheable by sccache
@@ -84,12 +78,10 @@ if(USE_CUDA)
8478
caffe2_update_option(USE_CUDNN OFF)
8579
caffe2_update_option(USE_CUSPARSELT OFF)
8680
caffe2_update_option(USE_NVRTC OFF)
87-
caffe2_update_option(USE_TENSORRT OFF)
8881
set(CAFFE2_USE_CUDA OFF)
8982
set(CAFFE2_USE_CUDNN OFF)
9083
set(CAFFE2_USE_CUSPARSELT OFF)
9184
set(CAFFE2_USE_NVRTC OFF)
92-
set(CAFFE2_USE_TENSORRT OFF)
9385
endif()
9486
endif()
9587

@@ -1491,27 +1483,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
14911483
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS})
14921484
endif()
14931485

1494-
# --[ TensorRT integration with onnx-trt
1495-
function(add_onnx_tensorrt_subdir)
1496-
# We pass the paths we found to onnx tensorrt.
1497-
set(CUDNN_INCLUDE_DIR "${CUDNN_INCLUDE_PATH}")
1498-
set(CUDNN_LIBRARY "${CUDNN_LIBRARY_PATH}")
1499-
set(CMAKE_VERSION_ORIG "{CMAKE_VERSION}")
1500-
# TODO: this WAR is for https://github.com/pytorch/pytorch/issues/18524
1501-
set(CMAKE_VERSION "3.9.0")
1502-
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/onnx-tensorrt EXCLUDE_FROM_ALL)
1503-
set(CMAKE_VERSION "{CMAKE_VERSION_ORIG}")
1504-
endfunction()
1505-
if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO)
1506-
if(USE_TENSORRT)
1507-
add_onnx_tensorrt_subdir()
1508-
include_directories("${CMAKE_CURRENT_LIST_DIR}/../third_party/onnx-tensorrt")
1509-
caffe2_interface_library(nvonnxparser_static onnx_trt_library)
1510-
list(APPEND Caffe2_DEPENDENCY_WHOLE_LINK_LIBS onnx_trt_library)
1511-
set(CAFFE2_USE_TRT 1)
1512-
endif()
1513-
endif()
1514-
15151486
# --[ ATen checks
15161487
set(USE_LAPACK 0)
15171488

third_party/onnx-tensorrt

-1
This file was deleted.

0 commit comments

Comments
 (0)