Skip to content

Commit 3fff8df

Browse files
committed
remove more cudnn dependencies
1 parent f8b91ed commit 3fff8df

File tree

11 files changed

+10
-279
lines changed

11 files changed

+10
-279
lines changed

cmake/Modules/FindcuDNN.cmake

Lines changed: 0 additions & 243 deletions
This file was deleted.

cmake/dependencies.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ endif()
77

88
# If the custom finders are needed at this point, there are good chances that they will be needed when consuming the library as well
99
install(FILES "${CMAKE_SOURCE_DIR}/cmake/Modules/FindTensorRT.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/torchtrt/Modules")
10-
install(FILES "${CMAKE_SOURCE_DIR}/cmake/Modules/FindcuDNN.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/torchtrt/Modules")
1110

1211
# CUDA
1312
find_package(CUDAToolkit REQUIRED)
14-
find_package(cuDNN REQUIRED) # Headers are needed somewhere
1513

1614
# libtorch
1715
find_package(Torch REQUIRED)

core/plugins/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ target_link_libraries(${lib_name}
2323
TensorRT::nvinfer_plugin
2424
torch
2525
core_util
26-
cuDNN::cuDNN
2726
PRIVATE
2827
Threads::Threads
2928
)

examples/int8/ptq/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,13 @@ tar -xvzf libtorch_tensorrt.tar.gz
149149
unzip libtorch.zip
150150
```
151151

152-
> If cuDNN and TensorRT are not installed on your system / in your LD_LIBRARY_PATH then do the following as well
152+
> If TensorRT is not installed on your system / in your LD_LIBRARY_PATH then do the following as well
153153
154154
```sh
155155
cd deps
156-
mkdir cudnn && tar -xvzf <cuDNN TARBALL> --directory cudnn --strip-components=1
157156
mkdir tensorrt && tar -xvzf <TensorRT TARBALL> --directory tensorrt --strip-components=1
158157
cd ..
159-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:$(pwd)/deps/cudnn/lib64:/usr/local/cuda/lib
158+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:/usr/local/cuda/lib
160159
```
161160

162161
2) Build and run `ptq`

examples/int8/qat/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ tar -xvzf libtorch_tensorrt.tar.gz
4343
unzip libtorch.zip
4444
```
4545

46-
> If cuDNN and TensorRT are not installed on your system / in your LD_LIBRARY_PATH then do the following as well
46+
> If TensorRT is not installed on your system / in your LD_LIBRARY_PATH then do the following as well
4747
4848
```sh
4949
cd deps
50-
mkdir cudnn && tar -xvzf <cuDNN TARBALL> --directory cudnn --strip-components=1
5150
mkdir tensorrt && tar -xvzf <TensorRT TARBALL> --directory tensorrt --strip-components=1
5251
cd ..
53-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:$(pwd)/deps/cudnn/lib64:/usr/local/cuda/lib
52+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:/usr/local/cuda/lib
5453
```
5554

5655
2) Build and run `qat`

examples/torchtrt_runtime_example/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CXX=g++
22
DEP_DIR=$(PWD)/deps
33
INCLUDE_DIRS=-I$(DEP_DIR)/libtorch/include -I$(DEP_DIR)/torch_tensorrt/include
4-
LIB_DIRS=-L$(DEP_DIR)/torch_tensorrt/lib -L$(DEP_DIR)/libtorch/lib # -Wl,-rpath $(DEP_DIR)/tensorrt/lib -Wl,-rpath $(DEP_DIR)/cudnn/lib64
4+
LIB_DIRS=-L$(DEP_DIR)/torch_tensorrt/lib -L$(DEP_DIR)/libtorch/lib # -Wl,-rpath $(DEP_DIR)/tensorrt/lib
55
LIBS=-Wl,--no-as-needed -ltorchtrt_runtime -Wl,--as-needed -ltorch -ltorch_cuda -ltorch_cpu -ltorch_global_deps -lbackend_with_compiler -lc10 -lc10_cuda
66
SRCS=main.cpp
77

examples/torchtrt_runtime_example/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ tar -xvzf libtorch_tensorrt.tar.gz
2626
unzip libtorch-cxx11-abi-shared-with-deps-[PYTORCH_VERSION].zip
2727
```
2828

29-
> If cuDNN and TensorRT are not installed on your system / in your LD_LIBRARY_PATH then do the following as well
29+
> If TensorRT is not installed on your system / in your LD_LIBRARY_PATH then do the following as well
3030
3131
```sh
3232
cd deps
33-
mkdir cudnn && tar -xvzf <cuDNN TARBALL> --directory cudnn --strip-components=1
3433
mkdir tensorrt && tar -xvzf <TensorRT TARBALL> --directory tensorrt --strip-components=1
3534
cd ..
36-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:$(pwd)/deps/cudnn/lib64:/usr/local/cuda/lib
35+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:/usr/local/cuda/lib
3736
```
3837

39-
This gives maximum compatibility with system configurations for running this example but in general you are better off adding `-Wl,-rpath $(DEP_DIR)/tensorrt/lib -Wl,-rpath $(DEP_DIR)/cudnn/lib64` to your linking command for actual applications
38+
This gives maximum compatibility with system configurations for running this example but in general you are better off adding `-Wl,-rpath $(DEP_DIR)/tensorrt/lib` to your linking command for actual applications
4039

4140
2) Build and run `torchtrt_runtime_example`
4241

@@ -48,6 +47,6 @@ To build and run the app
4847
cd examples/torchtrt_runtime_example
4948
make
5049
# If paths are different than the ones below, change as necessary
51-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:$(pwd)/deps/cudnn/lib64:/usr/local/cuda/lib
50+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/deps/torch_tensorrt/lib:$(pwd)/deps/libtorch/lib:$(pwd)/deps/tensorrt/lib:/usr/local/cuda/lib
5251
./torchtrt_runtime_example $PWD/examples/torchtrt_runtime_example/norm.jit
5352
```

notebooks/Resnet50-CPP.ipynb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,6 @@
172172
"unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cu113.zip"
173173
]
174174
},
175-
{
176-
"cell_type": "code",
177-
"execution_count": null,
178-
"id": "198553b7",
179-
"metadata": {},
180-
"outputs": [],
181-
"source": [
182-
"%%bash\n",
183-
"cd deps\n",
184-
"wget https://github.com/pytorch/TensorRT/releases/download/v1.1.0/libtorchtrt-v1.1.0-cudnn8.2-tensorrt8.2-cuda11.3-libtorch1.11.0.tar.gz\n",
185-
"tar -xvzf libtorchtrt-v1.1.0-cudnn8.2-tensorrt8.2-cuda11.3-libtorch1.11.0.tar.gz"
186-
]
187-
},
188175
{
189176
"cell_type": "markdown",
190177
"id": "309696b6",

py/ci/build_whl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ libtorchtrt() {
101101
TORCHTRT_VERSION=$(cd ${PROJECT_DIR} && ${PY_DIR}/bin/python3 -c "import versions; versions.torch_tensorrt_version_release()")
102102
TRT_VERSION=$(cd ${PROJECT_DIR} && ${PY_DIR}/bin/python3 -c "import versions; versions.tensorrt_version()")
103103
TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
104-
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
104+
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
105105
}
106106

107107
libtorchtrt_pre_cxx11_abi() {

py/ci/soname_excludes.params

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
--exclude libcuda.so.515
3131
--exclude libcublasLt.so.11
3232
--exclude libnvinfer.so.8
33-
--exclude libcudnn.so.8
3433
--exclude libcublas.so.12
3534
--exclude libcublasLt.so.12
3635
--exclude libcublas.so.12.1.3.1

toolchains/ci_workspaces/WORKSPACE.win.release.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ http_archive(
7373
# Locally installed dependencies (use in cases of custom dependencies or aarch64)
7474
####################################################################################
7575

76-
new_local_repository(
77-
name = "cudnn",
78-
path = "C:/",
79-
build_file = "@//third_party/cudnn/local:BUILD"
80-
)
81-
8276
new_local_repository(
8377
name = "tensorrt",
8478
path = "C:/",

0 commit comments

Comments
 (0)