Browse Source

update paddle-tensorrt desc (#4472)

* update paddle-tensorrt desc

* update en
zhang-prog 2 months ago
parent
commit
cd8654b5a1

+ 22 - 19
docs/installation/paddlepaddle_install.en.md

@@ -43,13 +43,8 @@ nvidia-docker run --name paddlex -v $PWD:/paddle  --shm-size=8G --network=host -
 
 
 * 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)
 * 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)
 
 
-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
-
-```bash
-python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
-```
-
 ## Installing PaddlePaddle via pip
 ## Installing PaddlePaddle via pip
+
 <b>If you choose to install via pip</b>, please refer to the following commands to install PaddlePaddle in your current environment using pip:
 <b>If you choose to install via pip</b>, please refer to the following commands to install PaddlePaddle in your current environment using pip:
 
 
 ```bash
 ```bash
@@ -100,21 +95,29 @@ python -m pip install https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-Ta
 
 
 ## Install the TensorRT Subgraph Engine
 ## Install the TensorRT Subgraph Engine
 
 
-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:
+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):
 
 
-- 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**.
+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.
 
 
-Below is an example of installing TensorRT 8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
+    ```bash
+    python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
+    ```
 
 
-```bash
-# Download TensorRT tar file
-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
-# Extract TensorRT tar file
-tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
-# Install TensorRT wheel package
-python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
-# Add the absolute path of TensorRT's `lib` directory to LD_LIBRARY_PATH
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
-```
+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:
+
+    - 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**.
+
+    Below is an example of installing TensorRT 8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
+
+    ```bash
+    # Download TensorRT tar file
+    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
+    # Extract TensorRT tar file
+    tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
+    # Install TensorRT wheel package
+    python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
+    # Add the absolute path of TensorRT's `lib` directory to LD_LIBRARY_PATH
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
+    ```
 
 
 > ❗ <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.
 > ❗ <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.

+ 22 - 19
docs/installation/paddlepaddle_install.md

@@ -44,13 +44,8 @@ nvidia-docker run --name paddlex -v $PWD:/paddle --shm-size=8G --network=host -i
 
 
 * 注:更多飞桨官方 docker 镜像请参考[飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/docker/linux-docker.html)。
 * 注:更多飞桨官方 docker 镜像请参考[飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/docker/linux-docker.html)。
 
 
-在刚刚启动的 `paddlex` 容器中执行下面指令安装 TensorRT,即可使用 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html):
-
-```bash
-python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
-```
-
 ## 基于 pip 安装飞桨
 ## 基于 pip 安装飞桨
+
 <b>若您通过 pip 安装</b>,请参考下述命令,用 pip 在当前环境中安装飞桨 PaddlePaddle:
 <b>若您通过 pip 安装</b>,请参考下述命令,用 pip 在当前环境中安装飞桨 PaddlePaddle:
 
 
 ```bash
 ```bash
@@ -103,21 +98,29 @@ python -m https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-TagBuild-Train
 
 
 ## 安装 TensorRT 子图引擎
 ## 安装 TensorRT 子图引擎
 
 
-如果想要使用 [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
+如果想要使用 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html):
 
 
-- 对于 CUDA 11.8 版本的飞桨,兼容的 TensorRT 版本为 8.x(x>=6)。PaddleX 已在 TensorRT 8.6.1.6 上完成了 Paddle-TensorRT 的兼容性测试,因此**强烈建议安装 TensorRT 8.6.1.6**。
+1. 若您使用的是 PaddlePaddle 3.0 的官方镜像,需在启动的容器中执行下面指令安装 TensorRT:
 
 
-下面是在 CUDA 11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT 8.6.1.6 的例子:
+    ```bash
+    python -m pip install /usr/local/TensorRT-*/python/tensorrt-*-cp310-none-linux_x86_64.whl
+    ```
 
 
-```bash
-# 下载 TensorRT tar 文件
-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
-# 解压 TensorRT tar 文件
-tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
-# 安装 TensorRT wheel 包
-python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
-# 添加 TensorRT 的 `lib` 目录的绝对路径到 LD_LIBRARY_PATH 中
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
-```
+2. 若您使用的是 PaddlePaddle 3.1 及以上版本的官方镜像或使用 pip 安装的 PaddlePaddle,需参考 [TensorRT 文档](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html) 安装相应版本的 TensorRT:
+
+    - 对于 CUDA 11.8 版本的飞桨,兼容的 TensorRT 版本为 8.x(x>=6)。PaddleX 已在 TensorRT 8.6.1.6 上完成了 Paddle-TensorRT 的兼容性测试,因此**强烈建议安装 TensorRT 8.6.1.6**。
+
+    下面是在 CUDA 11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT 8.6.1.6 的例子:
+
+    ```bash
+    # 下载 TensorRT tar 文件
+    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
+    # 解压 TensorRT tar 文件
+    tar xvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-11.8.tar.gz
+    # 安装 TensorRT wheel 包
+    python -m pip install TensorRT-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
+    # 添加 TensorRT 的 `lib` 目录的绝对路径到 LD_LIBRARY_PATH 中
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:TensorRT-8.6.1.6/lib"
+    ```
 
 
 > ❗ <b>注</b>:如果在安装的过程中,出现任何问题,欢迎在Paddle仓库中[提Issue](https://github.com/PaddlePaddle/Paddle/issues)。
 > ❗ <b>注</b>:如果在安装的过程中,出现任何问题,欢迎在Paddle仓库中[提Issue](https://github.com/PaddlePaddle/Paddle/issues)。

+ 1 - 1
docs/pipeline_deploy/high_performance_inference.en.md

@@ -126,7 +126,7 @@ pip list | grep nvidia-cuda
 pip list | grep nvidia-cudnn
 pip list | grep nvidia-cudnn
 ```
 ```
 
 
-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.
+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.
 
 
 After confirming that the correct versions of CUDA, cuDNN, and TensorRT (optional) are installed, run:
 After confirming that the correct versions of CUDA, cuDNN, and TensorRT (optional) are installed, run:
 
 

+ 1 - 1
docs/pipeline_deploy/high_performance_inference.md

@@ -124,7 +124,7 @@ pip list | grep nvidia-cuda
 pip list | grep nvidia-cudnn
 pip list | grep nvidia-cudnn
 ```
 ```
 
 
-如果希望使用 Paddle Inference TensorRT 子图引擎,需额外安装 TensorRT。请参考 [飞桨PaddlePaddle本地安装教程](../installation/paddlepaddle_install.md) 中的相关说明。需要注意的是,由于高性能推理插件的底层推理库也集成了 TensorRT,建议安装相同版本的 TensorRT 以避免版本冲突。目前,CUDA 11.8 的高性能推理插件底层推理库集成的 TensorRT 版本为 8.6.1.6。如果使用的是飞桨框架官方镜像,则无需关心版本冲突问题。
+如果希望使用 Paddle Inference TensorRT 子图引擎,需额外安装 TensorRT。请参考 [飞桨PaddlePaddle本地安装教程](../installation/paddlepaddle_install.md) 中的相关说明。需要注意的是,由于高性能推理插件的底层推理库也集成了 TensorRT,建议安装相同版本的 TensorRT 以避免版本冲突。目前,CUDA 11.8 的高性能推理插件底层推理库集成的 TensorRT 版本为 8.6.1.6。如果使用的是飞桨框架 PaddlePaddle 3.0 的官方镜像,则无需关心版本冲突问题。
 
 
 确认安装了正确版本的 CUDA、cuDNN、以及 TensorRT (可选)后,执行:
 确认安装了正确版本的 CUDA、cuDNN、以及 TensorRT (可选)后,执行: