@@ -40,7 +40,6 @@ if(USE_CUDA)
40
40
set (CAFFE2_USE_CUDNN ${USE_CUDNN} )
41
41
set (CAFFE2_USE_CUSPARSELT ${USE_CUSPARSELT} )
42
42
set (CAFFE2_USE_NVRTC ${USE_NVRTC} )
43
- set (CAFFE2_USE_TENSORRT ${USE_TENSORRT} )
44
43
include (${CMAKE_CURRENT_LIST_DIR} /public /cuda.cmake)
45
44
if (CAFFE2_USE_CUDA)
46
45
# A helper variable recording the list of Caffe2 dependent libraries
@@ -63,11 +62,6 @@ if(USE_CUDA)
63
62
else ()
64
63
caffe2_update_option(USE_CUSPARSELT OFF )
65
64
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 ()
71
65
find_program (SCCACHE_EXECUTABLE sccache)
72
66
if (SCCACHE_EXECUTABLE)
73
67
# Using RSP/--options-file renders output noncacheable by sccache
@@ -84,12 +78,10 @@ if(USE_CUDA)
84
78
caffe2_update_option(USE_CUDNN OFF )
85
79
caffe2_update_option(USE_CUSPARSELT OFF )
86
80
caffe2_update_option(USE_NVRTC OFF )
87
- caffe2_update_option(USE_TENSORRT OFF )
88
81
set (CAFFE2_USE_CUDA OFF )
89
82
set (CAFFE2_USE_CUDNN OFF )
90
83
set (CAFFE2_USE_CUSPARSELT OFF )
91
84
set (CAFFE2_USE_NVRTC OFF )
92
- set (CAFFE2_USE_TENSORRT OFF )
93
85
endif ()
94
86
endif ()
95
87
@@ -1491,27 +1483,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
1491
1483
set (BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} )
1492
1484
endif ()
1493
1485
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
-
1515
1486
# --[ ATen checks
1516
1487
set (USE_LAPACK 0)
1517
1488
0 commit comments