Skip to content

Commit aedcfbd

Browse files
committed
update paddle-tensorrt desc (#4472)
* update paddle-tensorrt desc * update en
1 parent ea48b94 commit aedcfbd

File tree

4 files changed

+46
-40
lines changed

4 files changed

+46
-40
lines changed

docs/installation/paddlepaddle_install.en.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@ nvidia-docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -
4343

4444
* Note: For more official PaddlePaddle Docker images, please refer to the [PaddlePaddle official website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/en/install/docker/linux-docker.html)
4545

46-
To use [Paddle Inference TensorRT Subgraph Engine](https://www.paddlepaddle.org.cn/documentation/docs/en/install/pip/linux-pip_en.html#gpu), install TensorRT by executing the following instructions in the 'paddlex' container that has just been started
47-
48-
```bash
49-
python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
50-
```
51-
5246
## Installing PaddlePaddle via pip
47+
5348
<b>If you choose to install via pip</b>, please refer to the following commands to install PaddlePaddle in your current environment using pip:
5449

5550
```bash
@@ -100,21 +95,29 @@ python -m pip install https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-Ta
10095

10196
## Install the TensorRT Subgraph Engine
10297

103-
If you want to use the [Paddle Inference TensorRT Subgraph Engine](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/paddle_v3_features/paddle_trt_en.html), after installing Paddle, you need to refer to the [TensorRT Documentation](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) to install the corresponding version of TensorRT:
98+
If you want to use the [Paddle Inference TensorRT Subgraph Engine](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/paddle_v3_features/paddle_trt_en.html):
10499

105-
- For PaddlePaddle with CUDA 11.8, the compatible TensorRT version is 8.x (where x >= 6). PaddleX has completed compatibility tests of Paddle-TensorRT on TensorRT 8.6.1.6, so it is **strongly recommended to install TensorRT 8.6.1.6**.
100+
1. If you are using the official PaddlePaddle 3.0 Docker image, you need to run the following command in the started container to install TensorRT.
106101

107-
Below is an example of installing TensorRT 8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
102+
```bash
103+
python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
104+
```
108105

109-
```bash
110-
# Download TensorRT tar file
111-
wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
112-
# Extract TensorRT tar file
113-
tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
114-
# Install TensorRT wheel package
115-
python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
116-
# Add the absolute path of TensorRT's `lib` directory to LD_LIBRARY_PATH
117-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
118-
```
106+
2. If you are using the official PaddlePaddle 3.1 Docker image or higher, or if you installed PaddlePaddle with pip, you need to refer to the [TensorRT Documentation](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) to install the corresponding version of TensorRT:
107+
108+
- For PaddlePaddle with CUDA 11.8, the compatible TensorRT version is 8.x (where x >= 6). PaddleX has completed compatibility tests of Paddle-TensorRT on TensorRT 8.6.1.6, so it is **strongly recommended to install TensorRT 8.6.1.6**.
109+
110+
Below is an example of installing TensorRT 8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
111+
112+
```bash
113+
# Download TensorRT tar file
114+
wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
115+
# Extract TensorRT tar file
116+
tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
117+
# Install TensorRT wheel package
118+
python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
119+
# Add the absolute path of TensorRT's `lib` directory to LD_LIBRARY_PATH
120+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
121+
```
119122

120123
><b>Note</b>: If you encounter any issues during the installation process, feel free to [submit an issue](https://github.com/PaddlePaddle/Paddle/issues) in the Paddle repository.

docs/installation/paddlepaddle_install.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ nvidia-docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -i
4444

4545
* 注:更多飞桨官方 docker 镜像请参考[飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/docker/linux-docker.html)
4646

47-
在刚刚启动的 `paddlex` 容器中执行下面指令安装 TensorRT,即可使用 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html)
48-
49-
```bash
50-
python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
51-
```
52-
5347
## 基于 pip 安装飞桨
48+
5449
<b>若您通过 pip 安装</b>,请参考下述命令,用 pip 在当前环境中安装飞桨 PaddlePaddle:
5550

5651
```bash
@@ -103,21 +98,29 @@ python -m https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-TagBuild-Train
10398

10499
## 安装 TensorRT 子图引擎
105100

106-
如果想要使用 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html),在安装paddle后需参考 [TensorRT 文档](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) 安装相应版本的 TensorRT
101+
如果想要使用 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html)
107102

108-
- 对于 CUDA 11.8 版本的飞桨,兼容的 TensorRT 版本为 8.x(x>=6)。PaddleX 已在 TensorRT 8.6.1.6 上完成了 Paddle-TensorRT 的兼容性测试,因此**强烈建议安装 TensorRT 8.6.1.6**
103+
1. 若您使用的是 PaddlePaddle 3.0 的官方镜像,需在启动的容器中执行下面指令安装 TensorRT
109104

110-
下面是在 CUDA 11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT 8.6.1.6 的例子:
105+
```bash
106+
python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
107+
```
111108

112-
```bash
113-
# 下载 TensorRT tar 文件
114-
wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
115-
# 解压 TensorRT tar 文件
116-
tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
117-
# 安装 TensorRT wheel 包
118-
python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
119-
# 添加 TensorRT 的 `lib` 目录的绝对路径到 LD_LIBRARY_PATH 中
120-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
121-
```
109+
2. 若您使用的是 PaddlePaddle 3.1 及以上版本的官方镜像或使用 pip 安装的 PaddlePaddle,需参考 [TensorRT 文档](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) 安装相应版本的 TensorRT:
110+
111+
- 对于 CUDA 11.8 版本的飞桨,兼容的 TensorRT 版本为 8.x(x>=6)。PaddleX 已在 TensorRT 8.6.1.6 上完成了 Paddle-TensorRT 的兼容性测试,因此**强烈建议安装 TensorRT 8.6.1.6**
112+
113+
下面是在 CUDA 11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT 8.6.1.6 的例子:
114+
115+
```bash
116+
# 下载 TensorRT tar 文件
117+
wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
118+
# 解压 TensorRT tar 文件
119+
tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
120+
# 安装 TensorRT wheel 包
121+
python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
122+
# 添加 TensorRT 的 `lib` 目录的绝对路径到 LD_LIBRARY_PATH 中
123+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
124+
```
122125

123126
><b></b>:如果在安装的过程中,出现任何问题,欢迎在Paddle仓库中[提Issue](https://github.com/PaddlePaddle/Paddle/issues)。

docs/pipeline_deploy/high_performance_inference.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pip list | grep nvidia-cuda
126126
pip list | grep nvidia-cudnn
127127
```
128128

129-
If you wish to use the Paddle Inference TensorRT subgraph engine, you will need to install TensorRT additionally. Please refer to the related instructions in the [PaddlePaddle Local Installation Tutorial](../installation/paddlepaddle_install.en.md). Note that because the underlying inference library of the high-performance inference plugin also integrates TensorRT, it is recommended to install the same version of TensorRT to avoid version conflicts. Currently, the TensorRT version integrated into the CUDA 11.8 high-performance inference plugin's underlying inference library is 8.6.1.6. If you are using the official PaddlePaddle image, you do not need to worry about version conflicts.
129+
If you wish to use the Paddle Inference TensorRT subgraph engine, you will need to install TensorRT additionally. Please refer to the related instructions in the [PaddlePaddle Local Installation Tutorial](../installation/paddlepaddle_install.en.md). Note that because the underlying inference library of the high-performance inference plugin also integrates TensorRT, it is recommended to install the same version of TensorRT to avoid version conflicts. Currently, the TensorRT version integrated into the CUDA 11.8 high-performance inference plugin's underlying inference library is 8.6.1.6. If you are using the official PaddlePaddle 3.0 Docker image, you do not need to worry about version conflicts.
130130

131131
After confirming that the correct versions of CUDA, cuDNN, and TensorRT (optional) are installed, run:
132132

docs/pipeline_deploy/high_performance_inference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pip list | grep nvidia-cuda
124124
pip list | grep nvidia-cudnn
125125
```
126126

127-
如果希望使用 Paddle Inference TensorRT 子图引擎,需额外安装 TensorRT。请参考 [飞桨PaddlePaddle本地安装教程](../installation/paddlepaddle_install.md) 中的相关说明。需要注意的是,由于高性能推理插件的底层推理库也集成了 TensorRT,建议安装相同版本的 TensorRT 以避免版本冲突。目前,CUDA 11.8 的高性能推理插件底层推理库集成的 TensorRT 版本为 8.6.1.6。如果使用的是飞桨框架官方镜像,则无需关心版本冲突问题。
127+
如果希望使用 Paddle Inference TensorRT 子图引擎,需额外安装 TensorRT。请参考 [飞桨PaddlePaddle本地安装教程](../installation/paddlepaddle_install.md) 中的相关说明。需要注意的是,由于高性能推理插件的底层推理库也集成了 TensorRT,建议安装相同版本的 TensorRT 以避免版本冲突。目前,CUDA 11.8 的高性能推理插件底层推理库集成的 TensorRT 版本为 8.6.1.6。如果使用的是飞桨框架 PaddlePaddle 3.0 的官方镜像,则无需关心版本冲突问题。
128128

129129
确认安装了正确版本的 CUDA、cuDNN、以及 TensorRT (可选)后,执行:
130130

0 commit comments

Comments
 (0)