Skip to content

Commit 572d54f

Browse files
committed
TensorRT Open Source Release v7.0
Release Notes: https://docs.nvidia.com/deeplearning/sdk/tensorrt-release-notes/tensorrt-7.html Signed-off-by: Rajeev Rao <[email protected]>
1 parent daacf15 commit 572d54f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3558
-1039
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build/
2+
docker/jetpack_files/*

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "parsers/onnx"]
22
path = parsers/onnx
33
url = https://github.com/onnx/onnx-tensorrt.git
4-
branch = master
4+
branch = 7.0
55
[submodule "third_party/protobuf"]
66
path = third_party/protobuf
77
url = https://github.com/protocolbuffers/protobuf.git

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ endif()
107107
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -Wno-deprecated-declarations")
108108

109109
################################### DEPENDENCIES ##########################################
110-
set(DEFAULT_CUDA_VERSION 10.1)
111-
set(DEFAULT_CUDNN_VERSION 7.5)
110+
set(DEFAULT_CUDA_VERSION 10.2)
111+
set(DEFAULT_CUDNN_VERSION 7.6)
112112
set(DEFAULT_PROTOBUF_VERSION 3.0.0)
113113
set(DEFAULT_PROTOBUF_INTERNAL_VERSION 10.0)
114114
set(DEFAULT_CUB_VERSION 1.8.0)

README.md

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ To build the TensorRT OSS components, ensure you meet the following package requ
1515

1616
* [CUDA](https://developer.nvidia.com/cuda-toolkit)
1717
* Recommended versions:
18-
* [cuda-10.1](https://developer.nvidia.com/cuda-10.1-download-archive-base) + cuDNN-7.6
18+
* [cuda-10.2](https://developer.nvidia.com/cuda-10.2-download-archive-base) + cuDNN-7.6
1919
* [cuda-10.0](https://developer.nvidia.com/cuda-10.0-download-archive) + cuDNN-7.6
20-
* [cuda-9.0](https://developer.nvidia.com/cuda-90-download-archive) + cuDNN 7.6
2120

2221
* [GNU Make](https://ftp.gnu.org/gnu/make/) >= v4.1
2322

@@ -33,6 +32,9 @@ To build the TensorRT OSS components, ensure you meet the following package requ
3332
* Essential libraries and utilities
3433
* [Git](https://git-scm.com/downloads), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), [Wget](https://www.gnu.org/software/wget/faq.html#download), [Zlib](https://zlib.net/)
3534

35+
* Cross compilation for Jetson platforms requires JetPack's host component installation
36+
* [JetPack](https://developer.nvidia.com/embedded/jetpack) >= 4.2
37+
3638
**Optional Packages**
3739

3840
* Containerized builds
@@ -45,11 +47,12 @@ To build the TensorRT OSS components, ensure you meet the following package requ
4547

4648
**TensorRT Release**
4749

48-
* [TensorRT](https://developer.nvidia.com/nvidia-tensorrt-download) v6.0.1
50+
* [TensorRT](https://developer.nvidia.com/nvidia-tensorrt-download) v7.0
51+
4952

5053
NOTE: Along with the TensorRT OSS components, the following source packages will also be downloaded, and they are not required to be installed on the system.
5154

52-
- [ONNX-TensorRT](https://github.com/onnx/onnx-tensorrt) v6.0
55+
- [ONNX-TensorRT](https://github.com/onnx/onnx-tensorrt) v7.0
5356
- [CUB](http://nvlabs.github.io/cub/) v1.8.0
5457
- [Protobuf](https://github.com/protocolbuffers/protobuf.git) v3.8.x
5558

@@ -59,38 +62,48 @@ NOTE: Along with the TensorRT OSS components, the following source packages will
5962
1. #### Download TensorRT OSS sources.
6063

6164
```bash
62-
git clone -b master https://github.com/nvidia/TensorRT TensorRT
65+
git clone -b master https://github.com/nvidia/TensorRT TensorRT -b release/7.0
6366
cd TensorRT
6467
git submodule update --init --recursive
6568
export TRT_SOURCE=`pwd`
6669
```
6770

6871
2. #### Download the TensorRT binary release.
6972

70-
To build the TensorRT OSS, obtain the corresponding TensorRT 6.0.1 binary release from [NVidia Developer Zone](https://developer.nvidia.com/nvidia-tensorrt-download). For a list of key features, known and fixed issues, see the [TensorRT 6.0.1 Release Notes](https://docs.nvidia.com/deeplearning/sdk/tensorrt-release-notes/index.html).
73+
To build the TensorRT OSS, obtain the corresponding TensorRT 7.0 binary release from [NVidia Developer Zone](https://developer.nvidia.com/nvidia-tensorrt-7x-download). For a list of key features, known and fixed issues, refer to the [TensorRT 7.0 Release Notes](https://docs.nvidia.com/deeplearning/sdk/tensorrt-release-notes/tensorrt-7.html#tensorrt-7).
7174

72-
**Example: Ubuntu 18.04 with cuda-10.1**
75+
**Example: Ubuntu 18.04 with cuda-10.2**
7376

74-
Download and extract the *TensorRT 6.0.1.5 GA for Ubuntu 18.04 and CUDA 10.1 tar package*
77+
Download and extract the latest *TensorRT 7.0 GA package for Ubuntu 18.04 and CUDA 10.2*
7578
```bash
7679
cd ~/Downloads
77-
# Download TensorRT-6.0.1.5.Ubuntu-18.04.x86_64-gnu.cuda-10.1.cudnn7.6.tar.gz
78-
tar -xvzf TensorRT-6.0.1.5.Ubuntu-18.04.x86_64-gnu.cuda-10.1.cudnn7.6.tar.gz
79-
export TRT_RELEASE=`pwd`/TensorRT-6.0.1.5
80+
# Download TensorRT-7.0.0.11.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz
81+
tar -xvzf TensorRT-7.0.0.11.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz
82+
export TRT_RELEASE=`pwd`/TensorRT-7.0.0.11
8083
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TRT_RELEASE/lib
8184
```
8285

83-
**Example: CentOS/RedHat 7 with cuda-9.0**
86+
**Example: CentOS/RedHat 7 with cuda-10.0**
8487

85-
Download and extract the *TensorRT 6.0.1.5 GA for CentOS/RedHat 7 and CUDA 9.0 tar package*
88+
Download and extract the *TensorRT 7.0 GA for CentOS/RedHat 7 and CUDA 10.0 tar package*
8689
```bash
8790
cd ~/Downloads
88-
# Download TensorRT-6.0.1.5.Red-Hat.x86_64-gnu.cuda-9.0.cudnn7.6.tar.gz
89-
tar -xvzf TensorRT-6.0.1.5.Red-Hat.x86_64-gnu.cuda-9.0.cudnn7.6.tar.gz
90-
export TRT_RELEASE=`pwd`/TensorRT-6.0.1.5
91+
# Download TensorRT-7.0.0.11.CentOS-7.6.x86_64-gnu.cuda-10.0.cudnn7.6.tar.gz
92+
tar -xvzf TensorRT-7.0.0.11.CentOS-7.6.x86_64-gnu.cuda-10.0.cudnn7.6.tar.gz
93+
export TRT_RELEASE=`pwd`/TensorRT-7.0.0.11
9194
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TRT_RELEASE/lib
9295
```
9396

97+
3. #### Download JetPack packages for cross-compilation.[OPTIONAL]
98+
99+
Using the SDK manager, download the host componets of the PDK version or Jetpack specified in the name of the Dockerfile. To do this:
100+
101+
1. [**SDK Manager Step 01**] Log into the SDK manager
102+
2. [**SDK Manager Step 01**] Select the correct platform and Target OS System (should be corresponding to the name of the Dockerfile you are building (e.g. Jetson AGX Xavier, `Linux Jetpack 4.2.1`), then click `Continue`
103+
3. [**SDK Manager Step 02**] Under `Download & Install Options` make note of or change the download folder **and Select Download now. Install later.** then agree to the license terms and click `Continue`
104+
105+
You should now have all expected files to build the container. Move these into the `docker/jetpack_files` folder.
106+
94107
## Setting Up The Build Environment
95108

96109
* Install the *System Packages* list of components in the *Prerequisites* section.
@@ -99,24 +112,30 @@ NOTE: Along with the TensorRT OSS components, the following source packages will
99112

100113
1. #### Generate the TensorRT build container.
101114

102-
The docker container can be built using the included Dockerfile. The build container is configured with the environment and packages required for building TensorRT OSS.
115+
The docker container can be built using the included Dockerfile. The build container is configured with the environment and packages required for building TensorRT OSS.
103116

104-
**Example: Ubuntu 18.04 with cuda-10.1**
117+
**Example: Ubuntu 18.04 with cuda-10.2**
105118

106-
```bash
107-
docker build -f docker/ubuntu-18.04.Dockerfile --build-arg CUDA_VERSION=10.1 --tag=tensorrt .
108-
```
119+
```bash
120+
docker build -f docker/ubuntu.Dockerfile --build-arg UBUNTU_VERSION=18.04 --build-arg CUDA_VERSION=10.2 --tag=tensorrt-ubuntu .
121+
```
109122

110-
**Example: CentOS/RedHat 7 with cuda-9.0**
123+
**Example: CentOS/RedHat 7 with cuda-10.0**
111124

112-
```bash
113-
docker build -f docker/centos-7.Dockerfile --build-arg CUDA_VERSION=9.0 --tag=tensorrt .
114-
```
125+
```bash
126+
docker build -f docker/centos.Dockerfile --build-arg CENTOS_VERSION=7 --build-arg CUDA_VERSION=10.0 --tag=tensorrt-centos .
127+
```
128+
129+
**Example: Cross compile for JetPack 4.2.1 with cuda-10.0**
130+
```bash
131+
docker build -f docker/ubuntu-cross-aarch64.Dockerfile --build-arg UBUNTU_VERSION=18.04 --build-arg CUDA_VERSION=10.0 --tag tensorrt-ubuntu-aarch64 .
132+
`
133+
```
115134

116135
2. #### Launch the TensorRT build container.
117136

118137
```bash
119-
docker run -v $TRT_RELEASE:/tensorrt -v $TRT_SOURCE:/workspace/TensorRT -it tensorrt:latest
138+
docker run -v $TRT_RELEASE:/tensorrt -v $TRT_SOURCE:/workspace/TensorRT -it tensorrt-ubuntu:latest
120139
```
121140

122141
> NOTE: To run TensorRT/CUDA programs within the build container, install [nvidia-docker](#prerequisites). Replace the `docker run` command with `nvidia-docker run` or `docker run --runtime=nvidia`.
@@ -128,17 +147,15 @@ NOTE: Along with the TensorRT OSS components, the following source packages will
128147

129148
```bash
130149
cd $TRT_SOURCE
131-
mkdir -p build && cd build
150+
mkdir -p build && cd build
132151
cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_BIN_DIR=`pwd`/out
133152
make -j$(nproc)
134153
```
135154

136155
> NOTE:
137-
> 1. The default CUDA version used by CMake is 10.1. To override this, for example to 9.0, append `-DCUDA_VERSION=9.0` to the cmake command.
156+
> 1. The default CUDA version used by CMake is 10.2. To override this, for example to 10.0, append `-DCUDA_VERSION=10.0` to the cmake command.
138157
> 2. Samples may fail to link on CentOS7. To work around this create the following symbolic link:
139-
> ```bash
140-
> ln -s $TRT_BIN_DIR/libnvinfer_plugin.so $TRT_BIN_DIR/libnvinfer_plugin.so.6
141-
> ```
158+
> `ln -s $TRT_BIN_DIR/libnvinfer_plugin.so $TRT_BIN_DIR/libnvinfer_plugin.so.7`
142159

143160
The required CMake arguments are:
144161

@@ -150,9 +167,9 @@ NOTE: Along with the TensorRT OSS components, the following source packages will
150167

151168
- `CMAKE_BUILD_TYPE`: Specify if binaries generated are for release or debug (contain debug symbols). Values consists of [`Release`] | `Debug`
152169

153-
- `CUDA_VERISON`: The version of CUDA to target, for example [`10.1`].
170+
- `CUDA_VERISON`: The version of CUDA to target, for example [`10.2`].
154171

155-
- `CUDNN_VERSION`: The version of cuDNN to target, for example [`7.5`].
172+
- `CUDNN_VERSION`: The version of cuDNN to target, for example [`7.6`].
156173

157174
- `PROTOBUF_VERSION`: The version of Protobuf to use, for example [`3.8.x`]. Note: Changing this will not configure CMake to use a system version of Protobuf, it will configure CMake to download and try building that version.
158175

@@ -222,5 +239,5 @@ NOTE: Along with the TensorRT OSS components, the following source packages will
222239

223240
## Known Issues
224241

225-
#### TensorRT 6.0.1
226-
* See [Release Notes](https://docs.nvidia.com/deeplearning/sdk/tensorrt-release-notes/index.html).
242+
#### TensorRT 7.0
243+
* See [Release Notes](https://docs.nvidia.com/deeplearning/sdk/tensorrt-release-notes/tensorrt-7.html#tensorrt-7).

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.1.5
1+
7.0.0.11
Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG CUDA_VERSION=10.1
16-
FROM nvcr.io/nvidia/cuda:${CUDA_VERSION}-cudnn7-devel-centos7
15+
ARG CUDA_VERSION=10.2
16+
ARG CENTOS_VERSION=7
17+
FROM nvidia/cuda:${CUDA_VERSION}-cudnn7-devel-centos${CENTOS_VERSION}
1718

1819
LABEL maintainer="NVIDIA CORPORATION"
1920

21+
ARG uid=1000
22+
ARG gid=1000
23+
RUN groupadd -r -f -g ${gid} trtuser && useradd -r -u ${uid} -g ${gid} -ms /bin/bash trtuser
24+
RUN usermod -aG wheel trtuser
25+
RUN echo 'trtuser:nvidia' | chpasswd
26+
RUN mkdir -p /workspace && chown trtuser /workspace
2027
# Install requried libraries
2128
RUN yum -y install \
2229
libcurl4-openssl-dev \
@@ -26,24 +33,27 @@ RUN yum -y install \
2633
pkg-config \
2734
python3 \
2835
python3-pip \
36+
python3-dev \
37+
python3-setuptools \
38+
python3-wheel \
39+
sudo \
2940
make
3041

3142
RUN cd /usr/local/bin &&\
3243
ln -s /usr/bin/python3 python &&\
3344
ln -s /usr/bin/pip3 pip
3445

3546
# Install Cmake
36-
RUN cd /tmp &&\
37-
wget https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.sh &&\
38-
chmod +x cmake-3.14.4-Linux-x86_64.sh &&\
39-
./cmake-3.14.4-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license &&\
47+
RUN cd /tmp && \
48+
wget https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.sh && \
49+
chmod +x cmake-3.14.4-Linux-x86_64.sh && \
50+
./cmake-3.14.4-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license && \
4051
rm ./cmake-3.14.4-Linux-x86_64.sh
4152

4253
# Set environment and working directory
4354
ENV TRT_RELEASE /tensorrt
44-
ENV TRT_LIB_DIR $TRT_RELEASE/lib
4555
ENV TRT_SOURCE /workspace/TensorRT
46-
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$TRT_LIB_DIR
4756
WORKDIR /workspace
4857

58+
USER trtuser
4959
RUN ["/bin/bash"]

docker/jetpack_files/.gitkeep

Whitespace-only changes.

docker/ubuntu-18.04.Dockerfile

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

0 commit comments

Comments
 (0)