Skip to content

Commit d7baf01

Browse files
committed
TensorRT OSS 21.02 release
Signed-off-by: Rajeev Rao <[email protected]>
1 parent 360eea3 commit d7baf01

File tree

210 files changed

+24807
-833
lines changed

Some content is hidden

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

210 files changed

+24807
-833
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
2+
name: TensorRT OSS Bug Report
3+
about: Report any bugs to help us improve TensorRT.
44
title: ''
55
labels: ''
66
assignees: ''
@@ -15,20 +15,20 @@ assignees: ''
1515
## Environment
1616

1717
**TensorRT Version**:
18-
**GPU Type**:
19-
**Nvidia Driver Version**:
18+
**NVIDIA GPU**:
19+
**NVIDIA Driver Version**:
2020
**CUDA Version**:
2121
**CUDNN Version**:
22-
**Operating System + Version**:
22+
**Operating System**:
2323
**Python Version (if applicable)**:
24-
**TensorFlow Version (if applicable)**:
24+
**Tensorflow Version (if applicable)**:
2525
**PyTorch Version (if applicable)**:
26-
**Baremetal or Container (if container which image + tag)**:
26+
**Baremetal or Container (if so, version)**:
2727

2828

2929
## Relevant Files
3030

31-
<!-- Please include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.) -->
31+
<!-- Please include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive/Dropbox, etc.) -->
3232

3333

3434
## Steps To Reproduce

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# TensorRT OSS Release Changelog
22

3+
## [21.02](https://github.com/NVIDIA/TensorRT/releases/tag/21.02) - 2021-02-01
4+
### Added
5+
- [TensorRT Python API bindings](python)
6+
- [TensorRT Python samples](samples/python)
7+
- FP16 support to batchedNMSPlugin [#1002](https://github.com/NVIDIA/TensorRT/pull/1002)
8+
- Configurable input size for TLT MaskRCNN Plugin [#986](https://github.com/NVIDIA/TensorRT/pull/986)
9+
10+
### Changed
11+
- TensorRT version updated to 7.2.2.3
12+
- [ONNX-TensorRT v21.02 update](https://github.com/onnx/onnx-tensorrt/blob/master/docs/Changelog.md#2102-container-release---2021-01-22)
13+
- [Polygraphy v0.21.1 update](tools/Polygraphy/CHANGELOG.md#v0211-2021-01-12)
14+
- [PyTorch-Quantization Toolkit](tools/pytorch-quantization) v2.1.0 update
15+
- Documentation update, ONNX opset 13 support, ResNet example
16+
- [ONNX-GraphSurgeon v0.28 update](tools/onnx-graphsurgeon/CHANGELOG.md#v028-2020-10-08)
17+
- [demoBERT builder](demo/BERT) updated to work with Tensorflow2 (in compatibility mode)
18+
- Refactor [Dockerfiles](docker) for OSS container
19+
20+
### Removed
21+
- N/A
22+
23+
324
## [20.12](https://github.com/NVIDIA/TensorRT/releases/tag/20.12) - 2020-12-18
425
### Added
526
- Add configurable input size for TLT MaskRCNN Plugin

LICENSE

+33-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176

177177
END OF TERMS AND CONDITIONS
178178

179-
Copyright 2020 NVIDIA Corporation
179+
Copyright 2021 NVIDIA Corporation
180180

181181
Licensed under the Apache License, Version 2.0 (the "License");
182182
you may not use this file except in compliance with the License.
@@ -193,6 +193,38 @@
193193

194194
PORTIONS LICENSED AS FOLLOWS
195195

196+
> tools/pytorch-quantization/examples/torchvision/models/classification/resnet.py
197+
198+
BSD 3-Clause License
199+
200+
Copyright (c) Soumith Chintala 2016,
201+
All rights reserved.
202+
203+
Redistribution and use in source and binary forms, with or without
204+
modification, are permitted provided that the following conditions are met:
205+
206+
* Redistributions of source code must retain the above copyright notice, this
207+
list of conditions and the following disclaimer.
208+
209+
* Redistributions in binary form must reproduce the above copyright notice,
210+
this list of conditions and the following disclaimer in the documentation
211+
and/or other materials provided with the distribution.
212+
213+
* Neither the name of the copyright holder nor the names of its
214+
contributors may be used to endorse or promote products derived from
215+
this software without specific prior written permission.
216+
217+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
218+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
219+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
220+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
221+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
222+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
223+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
224+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
225+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
226+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
227+
196228
> samples/common/windows/getopt.c
197229

198230
Copyright (c) 2002 Todd C. Miller <[email protected]>

NOTICE

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TensorRT Open Source Software
2+
Copyright (c) 2021, NVIDIA CORPORATION.
3+
4+
This product includes software developed at
5+
NVIDIA CORPORATION (https://www.nvidia.com/).
6+
7+
This software contains code derived by Soumith Chintala.
8+
BSD 3-Clause License (https://github.com/pytorch/vision/blob/master/LICENSE)

README.md

+48-71
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository contains the Open Source Software (OSS) components of NVIDIA Ten
1212
To build the TensorRT-OSS components, you will first need the following software packages.
1313

1414
**TensorRT GA build**
15-
* [TensorRT](https://developer.nvidia.com/nvidia-tensorrt-download) v7.2.1
15+
* [TensorRT](https://developer.nvidia.com/nvidia-tensorrt-download) v7.2.2
1616
- See [Downloading TensorRT Builds](#downloading-tensorrt-builds) for details
1717

1818
**System Packages**
@@ -56,69 +56,55 @@ To build the TensorRT-OSS components, you will first need the following software
5656
git clone -b master https://github.com/nvidia/TensorRT TensorRT
5757
cd TensorRT
5858
git submodule update --init --recursive
59-
export TRT_SOURCE=`pwd`
6059
```
6160
**On Windows: Powershell**
6261
```powershell
6362
git clone -b master https://github.com/nvidia/TensorRT TensorRT
6463
cd TensorRT
6564
git submodule update --init --recursive
66-
$Env:TRT_SOURCE = $(Get-Location)
6765
```
6866

69-
2. #### Download TensorRT GA
70-
To build TensorRT OSS, obtain the corresponding TensorRT GA build from [NVIDIA Developer Zone](https://developer.nvidia.com/nvidia-tensorrt-download).
67+
2. #### Specify the TensorRT Release build
7168

72-
**Example: Ubuntu 18.04 on x86-64 with cuda-11.1**
69+
If using NVIDIA build containers, TensorRT is preinstalled under `/usr/lib/x86_64-linux-gnu`.
7370

74-
Download and extract the latest *TensorRT 7.2.1 GA package for Ubuntu 18.04 and CUDA 11.1*
75-
```bash
76-
cd ~/Downloads
77-
tar -xvzf TensorRT-7.2.1.6.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz
78-
export TRT_RELEASE=`pwd`/TensorRT-7.2.1.6
79-
```
80-
**Example: Ubuntu 18.04 on PowerPC with cuda-11.0**
71+
Else download and extract the TensorRT build from [NVIDIA Developer Zone](https://developer.nvidia.com/nvidia-tensorrt-download).
8172

82-
Download and extract the latest *TensorRT 7.2.1 GA package for Ubuntu 18.04 and CUDA 11.0*
83-
```bash
84-
cd ~/Downloads
85-
tar -xvzf TensorRT-7.2.1.6.Ubuntu-18.04.powerpc64le-gnu.cuda-11.0.cudnn8.0.tar.gz
86-
export TRT_RELEASE=`pwd`/TensorRT-7.2.1.6
87-
```
88-
**Example: CentOS/RedHat 7 on x86-64 with cuda-11.0**
73+
**Example: Ubuntu 18.04 on x86-64 with cuda-11.1**
8974

90-
Download and extract the *TensorRT 7.2.1 GA for CentOS/RedHat 7 and CUDA 11.0 tar package*
91-
```bash
92-
cd ~/Downloads
93-
tar -xvzf TensorRT-7.2.1.6.CentOS-7.6.x86_64-gnu.cuda-11.0.cudnn8.0.tar.gz
94-
export TRT_RELEASE=`pwd`/TensorRT-7.2.1.6
95-
```
96-
**Example: Ubuntu18.04 Cross-Compile for QNX with cuda-10.2**
75+
```bash
76+
cd ~/Downloads
77+
tar -xvzf TensorRT-7.2.2.3.Ubuntu-18.04.x86_64-gnu.cuda-11.1.cudnn8.0.tar.gz
78+
export TRT_LIBPATH=`pwd`/TensorRT-7.2.2.3
79+
```
9780

98-
Download and extract the *TensorRT 7.2.1 GA for QNX and CUDA 10.2 tar package*
99-
```bash
100-
cd ~/Downloads
101-
tar -xvzf TensorRT-7.2.1.6.Ubuntu-18.04.aarch64-qnx.cuda-10.2.cudnn7.6.tar.gz
102-
export TRT_RELEASE=`pwd`/TensorRT-7.2.1.6
103-
export QNX_HOST=/<path-to-qnx-toolchain>/host/linux/x86_64
104-
export QNX_TARGET=/<path-to-qnx-toolchain>/target/qnx7
105-
```
106-
**Example: Windows on x86-64 with cuda-11.0**
81+
**Example: Ubuntu18.04 Cross-Compile for QNX with cuda-10.2**
82+
83+
```bash
84+
cd ~/Downloads
85+
tar -xvzf TensorRT-7.2.2.3.Ubuntu-18.04.aarch64-qnx.cuda-10.2.cudnn7.6.tar.gz
86+
export TRT_LIBPATH=`pwd`/TensorRT-7.2.2.3
87+
export QNX_HOST=/<path-to-qnx-toolchain>/host/linux/x86_64
88+
export QNX_TARGET=/<path-to-qnx-toolchain>/target/qnx7
89+
```
90+
91+
**Example: Windows on x86-64 with cuda-11.0**
92+
93+
```powershell
94+
cd ~\Downloads
95+
Expand-Archive .\TensorRT-7.2.2.3.Windows10.x86_64.cuda-11.0.cudnn8.0.zip
96+
$Env:TRT_LIBPATH = '$(Get-Location)\TensorRT-7.2.2.3'
97+
$Env:PATH += 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\'
98+
```
10799

108-
Download and extract the *TensorRT 7.2.1 GA for Windows and CUDA 11.0 zip package* and add *msbuild* to *PATH*
109-
```powershell
110-
cd ~\Downloads
111-
Expand-Archive .\TensorRT-7.2.1.6.Windows10.x86_64.cuda-11.0.cudnn8.0.zip
112-
$Env:TRT_RELEASE = '$(Get-Location)\TensorRT-7.2.1.6'
113-
$Env:PATH += 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\'
114-
```
115100

116101
3. #### (Optional) JetPack SDK for Jetson builds
117102
Using the JetPack SDK manager, download the host components. Steps:
118103
1. Download and launch the SDK manager. Login with your developer account.
119104
2. Select the platform and target OS (example: Jetson AGX Xavier, `Linux Jetpack 4.4`), and click Continue.
120105
3. Under `Download & Install Options` change the download folder and select `Download now, Install later`. Agree to the license terms and click Continue.
121-
4. Move the extracted files into the `$TRT_SOURCE/docker/jetpack_files` folder.
106+
4. Move the extracted files into the `<TensorRT-OSS>/docker/jetpack_files` folder.
107+
122108
123109
## Setting Up The Build Environment
124110
@@ -129,25 +115,25 @@ For native builds, install the [prerequisite](#prerequisites) *System Packages*.
129115
130116
**Example: Ubuntu 18.04 on x86-64 with cuda-11.1**
131117
```bash
132-
./docker/build.sh --file docker/ubuntu.Dockerfile --tag tensorrt-ubuntu --os 18.04 --cuda 11.1
118+
./docker/build.sh --file docker/ubuntu-18.04.Dockerfile --tag tensorrt-ubuntu-1804 --cuda 11.1
133119
```
134-
**Example: Ubuntu 18.04 on PowerPC with cuda-11.0**
120+
**Example: Ubuntu 18.04 cross-compile for PowerPC with cuda-11.0**
135121
```bash
136-
./docker/build.sh --file docker/ubuntu-cross-ppc64le.Dockerfile --tag tensorrt-ubuntu-ppc --os 18.04 --cuda 11.0
122+
./docker/build.sh --file docker/ubuntu-cross-ppc64le.Dockerfile --tag tensorrt-ubuntu-ppc --cuda 11.0
137123
```
138124
**Example: CentOS/RedHat 7 on x86-64 with cuda-11.0**
139125
```bash
140-
./docker/build.sh --file docker/centos.Dockerfile --tag tensorrt-centos --os 7 --cuda 11.0
126+
./docker/build.sh --file docker/centos-7.Dockerfile --tag tensorrt-centos --cuda 11.0
141127
```
142-
**Example: Ubuntu 18.04 Cross-Compile for Jetson (arm64) with cuda-10.2 (JetPack)**
128+
**Example: Ubuntu 18.04 cross-compile for Jetson (arm64) with cuda-10.2 (JetPack SDK)**
143129
```bash
144-
./docker/build.sh --file docker/ubuntu-cross-aarch64.Dockerfile --tag tensorrt-cross-jetpack --os 18.04 --cuda 10.2
130+
./docker/build.sh --file docker/ubuntu-cross-aarch64.Dockerfile --tag tensorrt-cross-jetpack --cuda 10.2
145131
```
146132
147133
2. #### Launch the TensorRT-OSS build container.
148134
**Example: Ubuntu 18.04 build container**
149135
```bash
150-
./docker/launch.sh --tag tensorrt-ubuntu --gpus all --release $TRT_RELEASE --source $TRT_SOURCE
136+
./docker/launch.sh --tag tensorrt-ubuntu-1804 --gpus all
151137
```
152138
> NOTE:
153139
1. Use the tag corresponding to the build container you generated in
@@ -158,37 +144,37 @@ For native builds, install the [prerequisite](#prerequisites) *System Packages*.
158144
159145
**Example: Linux (x86-64) build with default cuda-11.1**
160146
```bash
161-
cd $TRT_SOURCE
147+
cd $TRT_OSSPATH
162148
mkdir -p build && cd build
163-
cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out
149+
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out
164150
make -j$(nproc)
165151
```
166152
**Example: Native build on Jetson (arm64) with cuda-10.2**
167153
```bash
168-
cd $TRT_SOURCE
154+
cd $TRT_OSSPATH
169155
mkdir -p build && cd build
170-
cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out -DTRT_PLATFORM_ID=aarch64 -DCUDA_VERSION=10.2
156+
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DTRT_PLATFORM_ID=aarch64 -DCUDA_VERSION=10.2
171157
make -j$(nproc)
172158
```
173159
**Example: Ubuntu 18.04 Cross-Compile for Jetson (arm64) with cuda-10.2 (JetPack)**
174160
```bash
175-
cd $TRT_SOURCE
161+
cd $TRT_OSSPATH
176162
mkdir -p build && cd build
177-
cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out -DCMAKE_TOOLCHAIN_FILE=$TRT_SOURCE/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=10.2
163+
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DCMAKE_TOOLCHAIN_FILE=$TRT_OSSPATH/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=10.2
178164
make -j$(nproc)
179165
```
180166
**Example: Cross-Compile for QNX with cuda-10.2**
181167
```bash
182-
cd $TRT_SOURCE
168+
cd $TRT_OSSPATH
183169
mkdir -p build && cd build
184-
cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out -DCMAKE_TOOLCHAIN_FILE=$TRT_SOURCE/cmake/toolchains/cmake_qnx.toolchain -DCUDA_VERSION=10.2
170+
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DCMAKE_TOOLCHAIN_FILE=$TRT_OSSPATH/cmake/toolchains/cmake_qnx.toolchain -DCUDA_VERSION=10.2
185171
make -j$(nproc)
186172
```
187173
**Example: Windows (x86-64) build in Powershell**
188174
```powershell
189-
cd $Env:TRT_SOURCE
175+
cd $Env:TRT_OSSPATH
190176
mkdir -p build ; cd build
191-
cmake .. -DTRT_LIB_DIR=$Env:TRT_RELEASE\lib -DTRT_OUT_DIR='$(Get-Location)\out' -DCMAKE_TOOLCHAIN_FILE=..\cmake\toolchains\cmake_x64_win.toolchain
177+
cmake .. -DTRT_LIB_DIR=$Env:TRT_LIBPATH -DTRT_OUT_DIR='$(Get-Location)\out' -DCMAKE_TOOLCHAIN_FILE=..\cmake\toolchains\cmake_x64_win.toolchain
192178
msbuild ALL_BUILD.vcxproj
193179
```
194180
> NOTE:
@@ -215,15 +201,6 @@ For native builds, install the [prerequisite](#prerequisites) *System Packages*.
215201
- Multiple SMs: `-DGPU_ARCHS="80 75"`
216202
- `TRT_PLATFORM_ID`: Bare-metal build (unlike containerized cross-compilation) on non Linux/x86 platforms must explicitly specify the target platform. Currently supported options: `x86_64` (default), `aarch64`
217203
218-
#### (Optional) Install TensorRT python bindings
219-
220-
* The TensorRT python API bindings must be installed for running TensorRT python applications
221-
222-
**Example: install TensorRT wheel for python 3.6**
223-
```bash
224-
pip3 install $TRT_RELEASE/python/tensorrt-7.2.1.6-cp36-none-linux_x86_64.whl
225-
```
226-
227204
# References
228205
229206
## TensorRT Resources
@@ -236,5 +213,5 @@ For native builds, install the [prerequisite](#prerequisites) *System Packages*.
236213
237214
## Known Issues
238215
239-
#### TensorRT 7.2.1
216+
#### TensorRT 7.2.2
240217
* None

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.1.6
1+
7.2.2.3

demo/BERT/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ endif()
3333

3434
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
3535

36-
include($ENV{TRT_SOURCE}/cmake/modules/set_ifndef.cmake)
37-
set_ifndef(TRT_INC_DIR $ENV{TRT_SOURCE}/include)
38-
set_ifndef(TRT_LIB_DIR $ENV{TRT_RELEASE}/lib)
39-
set_ifndef(TRT_OUT_DIR $ENV{TRT_SOURCE}/build/out)
36+
include($ENV{TRT_OSSPATH}/cmake/modules/set_ifndef.cmake)
37+
set_ifndef(TRT_INC_DIR $ENV{TRT_OSSPATH}/include)
38+
set_ifndef(TRT_LIB_DIR $ENV{TRT_LIBPATH})
39+
set_ifndef(TRT_OUT_DIR $ENV{TRT_OSSPATH}/build/out)
4040

4141
include_directories(
4242
infer_c

0 commit comments

Comments
 (0)