Skip to content

Commit f2b8d9b

Browse files
committed
modify README
1 parent ef93b66 commit f2b8d9b

File tree

1 file changed

+15
-207
lines changed

1 file changed

+15
-207
lines changed

README.md

Lines changed: 15 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,210 +1,18 @@
11
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Documentation](https://img.shields.io/badge/TensorRT-documentation-brightgreen.svg)](https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html)
22

3-
# TensorRT Open Source Software
4-
This repository contains the Open Source Software (OSS) components of NVIDIA TensorRT. It includes the sources for TensorRT plugins and ONNX parser, as well as sample applications demonstrating usage and capabilities of the TensorRT platform. These open source software components are a subset of the TensorRT General Availability (GA) release with some extensions and bug-fixes.
5-
6-
* For code contributions to TensorRT-OSS, please see our [Contribution Guide](CONTRIBUTING.md) and [Coding Guidelines](CODING-GUIDELINES.md).
7-
* For a summary of new additions and updates shipped with TensorRT-OSS releases, please refer to the [Changelog](CHANGELOG.md).
8-
* For business inquiries, please contact [researchinquiries@nvidia.com](mailto:researchinquiries@nvidia.com)
9-
* For press and other inquiries, please contact Hector Marinez at [hmarinez@nvidia.com](mailto:hmarinez@nvidia.com)
10-
11-
Need enterprise support? NVIDIA global support is available for TensorRT with the [NVIDIA AI Enterprise software suite](https://www.nvidia.com/en-us/data-center/products/ai-enterprise/). Check out [NVIDIA LaunchPad](https://www.nvidia.com/en-us/launchpad/ai/ai-enterprise/) for free access to a set of hands-on labs with TensorRT hosted on NVIDIA infrastructure.
12-
13-
Join the [TensorRT and Triton community](https://www.nvidia.com/en-us/deep-learning-ai/triton-tensorrt-newsletter/) and stay current on the latest product updates, bug fixes, content, best practices, and more.
14-
15-
# Prebuilt TensorRT Python Package
16-
We provide the TensorRT Python package for an easy installation. \
17-
To install:
18-
```bash
19-
pip install tensorrt
3+
# Description
4+
This repo is folked from Tensorrt: https://github.com/NVIDIA/TensorRT.
5+
Will be clean up only for samples modifying, building, running and studying.
6+
7+
# Environment
8+
## Developing
9+
1. tbd -- conda env
10+
## deployment -- c++ compiling and running
11+
1. WSL2 + Unbuntu22.04: 5.15.153.1-microsoft-standard-WSL2
12+
2. CUDA: 12.4.99
13+
3. Tensorrt: 10.5.0
14+
15+
# CMD
16+
```
17+
clear && rm -rf build && mkdir build && cd build && cmake .. && make -j 20 && cd ..
2018
```
21-
You can skip the **Build** section to enjoy TensorRT with Python.
22-
23-
# Build
24-
25-
## Prerequisites
26-
To build the TensorRT-OSS components, you will first need the following software packages.
27-
28-
**TensorRT GA build**
29-
* TensorRT v10.5.0.18
30-
* Available from direct download links listed below
31-
32-
**System Packages**
33-
* [CUDA](https://developer.nvidia.com/cuda-toolkit)
34-
* Recommended versions:
35-
* cuda-12.6.0 + cuDNN-8.9
36-
* cuda-11.8.0 + cuDNN-8.9
37-
* [GNU make](https://ftp.gnu.org/gnu/make/) >= v4.1
38-
* [cmake](https://github.com/Kitware/CMake/releases) >= v3.13
39-
* [python](<https://www.python.org/downloads/>) >= v3.8, <= v3.10.x
40-
* [pip](https://pypi.org/project/pip/#history) >= v19.0
41-
* Essential utilities
42-
* [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)
43-
44-
**Optional Packages**
45-
* Containerized build
46-
* [Docker](https://docs.docker.com/install/) >= 19.03
47-
* [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker)
48-
* PyPI packages (for demo applications/tests)
49-
* [onnx](https://pypi.org/project/onnx/)
50-
* [onnxruntime](https://pypi.org/project/onnxruntime/)
51-
* [tensorflow-gpu](https://pypi.org/project/tensorflow/) >= 2.5.1
52-
* [Pillow](https://pypi.org/project/Pillow/) >= 9.0.1
53-
* [pycuda](https://pypi.org/project/pycuda/) < 2021.1
54-
* [numpy](https://pypi.org/project/numpy/)
55-
* [pytest](https://pypi.org/project/pytest/)
56-
* Code formatting tools (for contributors)
57-
* [Clang-format](https://clang.llvm.org/docs/ClangFormat.html)
58-
* [Git-clang-format](https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format)
59-
60-
> NOTE: [onnx-tensorrt](https://github.com/onnx/onnx-tensorrt), [cub](http://nvlabs.github.io/cub/), and [protobuf](https://github.com/protocolbuffers/protobuf.git) packages are downloaded along with TensorRT OSS, and not required to be installed.
61-
62-
## Downloading TensorRT Build
63-
64-
1. #### Download TensorRT OSS
65-
```bash
66-
git clone -b main https://github.com/nvidia/TensorRT TensorRT
67-
cd TensorRT
68-
git submodule update --init --recursive
69-
```
70-
71-
2. #### (Optional - if not using TensorRT container) Specify the TensorRT GA release build path
72-
73-
If using the TensorRT OSS build container, TensorRT libraries are preinstalled under `/usr/lib/x86_64-linux-gnu` and you may skip this step.
74-
75-
Else download and extract the TensorRT GA build from [NVIDIA Developer Zone](https://developer.nvidia.com) with the direct links below:
76-
- [TensorRT 10.5.0.18 for CUDA 11.8, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.5.0/tars/TensorRT-10.5.0.18.Linux.x86_64-gnu.cuda-11.8.tar.gz)
77-
- [TensorRT 10.5.0.18 for CUDA 12.6, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.5.0/tars/TensorRT-10.5.0.18.Linux.x86_64-gnu.cuda-12.6.tar.gz)
78-
- [TensorRT 10.5.0.18 for CUDA 11.8, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.5.0/zip/TensorRT-10.5.0.18.Windows.win10.cuda-11.8.zip)
79-
- [TensorRT 10.5.0.18 for CUDA 12.6, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.5.0/zip/TensorRT-10.5.0.18.Windows.win10.cuda-12.6.zip)
80-
81-
82-
**Example: Ubuntu 20.04 on x86-64 with cuda-12.6**
83-
84-
```bash
85-
cd ~/Downloads
86-
tar -xvzf TensorRT-10.5.0.18.Linux.x86_64-gnu.cuda-12.6.tar.gz
87-
export TRT_LIBPATH=`pwd`/TensorRT-10.5.0.18
88-
```
89-
90-
**Example: Windows on x86-64 with cuda-12.6**
91-
92-
```powershell
93-
Expand-Archive -Path TensorRT-10.5.0.18.Windows.win10.cuda-12.6.zip
94-
$env:TRT_LIBPATH="$pwd\TensorRT-10.5.0.18\lib"
95-
```
96-
97-
## Setting Up The Build Environment
98-
99-
For Linux platforms, we recommend that you generate a docker container for building TensorRT OSS as described below. For native builds, please install the [prerequisite](#prerequisites) *System Packages*.
100-
101-
1. #### Generate the TensorRT-OSS build container.
102-
The TensorRT-OSS build container can be generated using the supplied Dockerfiles and build scripts. The build containers are configured for building TensorRT OSS out-of-the-box.
103-
104-
**Example: Ubuntu 20.04 on x86-64 with cuda-12.6 (default)**
105-
```bash
106-
./docker/build.sh --file docker/ubuntu-20.04.Dockerfile --tag tensorrt-ubuntu20.04-cuda12.6
107-
```
108-
**Example: Rockylinux8 on x86-64 with cuda-12.6**
109-
```bash
110-
./docker/build.sh --file docker/rockylinux8.Dockerfile --tag tensorrt-rockylinux8-cuda12.6
111-
```
112-
**Example: Ubuntu 22.04 cross-compile for Jetson (aarch64) with cuda-12.6 (JetPack SDK)**
113-
```bash
114-
./docker/build.sh --file docker/ubuntu-cross-aarch64.Dockerfile --tag tensorrt-jetpack-cuda12.6
115-
```
116-
**Example: Ubuntu 22.04 on aarch64 with cuda-12.6**
117-
```bash
118-
./docker/build.sh --file docker/ubuntu-22.04-aarch64.Dockerfile --tag tensorrt-aarch64-ubuntu22.04-cuda12.6
119-
```
120-
121-
2. #### Launch the TensorRT-OSS build container.
122-
**Example: Ubuntu 20.04 build container**
123-
```bash
124-
./docker/launch.sh --tag tensorrt-ubuntu20.04-cuda12.6 --gpus all
125-
```
126-
> NOTE:
127-
<br> 1. Use the `--tag` corresponding to build container generated in Step 1.
128-
<br> 2. [NVIDIA Container Toolkit](#prerequisites) is required for GPU access (running TensorRT applications) inside the build container.
129-
<br> 3. `sudo` password for Ubuntu build containers is 'nvidia'.
130-
<br> 4. Specify port number using `--jupyter <port>` for launching Jupyter notebooks.
131-
132-
## Building TensorRT-OSS
133-
* Generate Makefiles and build.
134-
135-
**Example: Linux (x86-64) build with default cuda-12.6**
136-
```bash
137-
cd $TRT_OSSPATH
138-
mkdir -p build && cd build
139-
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out
140-
make -j$(nproc)
141-
```
142-
**Example: Linux (aarch64) build with default cuda-12.6**
143-
```bash
144-
cd $TRT_OSSPATH
145-
mkdir -p build && cd build
146-
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DCMAKE_TOOLCHAIN_FILE=$TRT_OSSPATH/cmake/toolchains/cmake_aarch64-native.toolchain
147-
make -j$(nproc)
148-
```
149-
**Example: Native build on Jetson (aarch64) with cuda-12.6**
150-
```bash
151-
cd $TRT_OSSPATH
152-
mkdir -p build && cd build
153-
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DTRT_PLATFORM_ID=aarch64 -DCUDA_VERSION=12.6
154-
CC=/usr/bin/gcc make -j$(nproc)
155-
```
156-
> NOTE: C compiler must be explicitly specified via CC= for native aarch64 builds of protobuf.
157-
158-
**Example: Ubuntu 22.04 Cross-Compile for Jetson (aarch64) with cuda-12.6 (JetPack)**
159-
```bash
160-
cd $TRT_OSSPATH
161-
mkdir -p build && cd build
162-
cmake .. -DCMAKE_TOOLCHAIN_FILE=$TRT_OSSPATH/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=12.6 -DCUDNN_LIB=/pdk_files/cudnn/usr/lib/aarch64-linux-gnu/libcudnn.so -DCUBLAS_LIB=/usr/local/cuda-12.6/targets/aarch64-linux/lib/stubs/libcublas.so -DCUBLASLT_LIB=/usr/local/cuda-12.6/targets/aarch64-linux/lib/stubs/libcublasLt.so -DTRT_LIB_DIR=/pdk_files/tensorrt/lib
163-
make -j$(nproc)
164-
```
165-
166-
**Example: Native builds on Windows (x86) with cuda-12.6**
167-
```powershell
168-
cd $TRT_OSSPATH
169-
mkdir -p build
170-
cd -p build
171-
cmake .. -DTRT_LIB_DIR="$env:TRT_LIBPATH" -DCUDNN_ROOT_DIR="$env:CUDNN_PATH" -DTRT_OUT_DIR="$pwd\\out"
172-
msbuild TensorRT.sln /property:Configuration=Release -m:$env:NUMBER_OF_PROCESSORS
173-
```
174-
175-
> NOTE:
176-
<br> 1. The default CUDA version used by CMake is 12.4.0. To override this, for example to 11.8, append `-DCUDA_VERSION=11.8` to the cmake command.
177-
* Required CMake build arguments are:
178-
- `TRT_LIB_DIR`: Path to the TensorRT installation directory containing libraries.
179-
- `TRT_OUT_DIR`: Output directory where generated build artifacts will be copied.
180-
* Optional CMake build arguments:
181-
- `CMAKE_BUILD_TYPE`: Specify if binaries generated are for release or debug (contain debug symbols). Values consists of [`Release`] | `Debug`
182-
- `CUDA_VERSION`: The version of CUDA to target, for example [`11.7.1`].
183-
- `CUDNN_VERSION`: The version of cuDNN to target, for example [`8.6`].
184-
- `PROTOBUF_VERSION`: The version of Protobuf to use, for example [`3.0.0`]. 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.
185-
- `CMAKE_TOOLCHAIN_FILE`: The path to a toolchain file for cross compilation.
186-
- `BUILD_PARSERS`: Specify if the parsers should be built, for example [`ON`] | `OFF`. If turned OFF, CMake will try to find precompiled versions of the parser libraries to use in compiling samples. First in `${TRT_LIB_DIR}`, then on the system. If the build type is Debug, then it will prefer debug builds of the libraries before release versions if available.
187-
- `BUILD_PLUGINS`: Specify if the plugins should be built, for example [`ON`] | `OFF`. If turned OFF, CMake will try to find a precompiled version of the plugin library to use in compiling samples. First in `${TRT_LIB_DIR}`, then on the system. If the build type is Debug, then it will prefer debug builds of the libraries before release versions if available.
188-
- `BUILD_SAMPLES`: Specify if the samples should be built, for example [`ON`] | `OFF`.
189-
- `GPU_ARCHS`: GPU (SM) architectures to target. By default we generate CUDA code for all major SMs. Specific SM versions can be specified here as a quoted space-separated list to reduce compilation time and binary size. Table of compute capabilities of NVIDIA GPUs can be found [here](https://developer.nvidia.com/cuda-gpus). Examples:
190-
- NVidia A100: `-DGPU_ARCHS="80"`
191-
- Tesla T4, GeForce RTX 2080: `-DGPU_ARCHS="75"`
192-
- Titan V, Tesla V100: `-DGPU_ARCHS="70"`
193-
- Multiple SMs: `-DGPU_ARCHS="80 75"`
194-
- `TRT_PLATFORM_ID`: Bare-metal build (unlike containerized cross-compilation). Currently supported options: `x86_64` (default).
195-
196-
# References
197-
198-
## TensorRT Resources
199-
200-
* [TensorRT Developer Home](https://developer.nvidia.com/tensorrt)
201-
* [TensorRT QuickStart Guide](https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html)
202-
* [TensorRT Developer Guide](https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html)
203-
* [TensorRT Sample Support Guide](https://docs.nvidia.com/deeplearning/tensorrt/sample-support-guide/index.html)
204-
* [TensorRT ONNX Tools](https://docs.nvidia.com/deeplearning/tensorrt/index.html#tools)
205-
* [TensorRT Discussion Forums](https://devtalk.nvidia.com/default/board/304/tensorrt/)
206-
* [TensorRT Release Notes](https://docs.nvidia.com/deeplearning/tensorrt/release-notes/index.html)
207-
208-
## Known Issues
209-
210-
* Please refer to [TensorRT Release Notes](https://docs.nvidia.com/deeplearning/tensorrt/release-notes)

0 commit comments

Comments
 (0)