浏览代码

update hpi, paddle, paddle2onnx docs (#3827)

* update hpi and paddle docs

* update
zhang-prog 7 月之前
父节点
当前提交
2164900018

+ 12 - 3
docs/installation/paddlepaddle_install.en.md

@@ -43,6 +43,12 @@ 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-8.6.1.6/python/tensorrt-8.6.1-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:
 
 
@@ -57,8 +63,6 @@ python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org
 python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
 python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
 ```
 ```
 
 
-The Docker images support the [Paddle Inference TensorRT Subgraph Engine](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/paddle_v3_features/paddle_trt_en.html) by default.
-
 Note: For more PaddlePaddle Wheel versions, please refer to the [PaddlePaddle official website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/en/install/pip/linux-pip.html).
 Note: For more PaddlePaddle Wheel versions, please refer to the [PaddlePaddle official website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/en/install/pip/linux-pip.html).
 
 
 <b>For installing PaddlePaddle on other hardware, please refer to</b> [PaddleX Multi-hardware Usage Guide](../other_devices_support/multi_devices_use_guide.en.md).
 <b>For installing PaddlePaddle on other hardware, please refer to</b> [PaddleX Multi-hardware Usage Guide](../other_devices_support/multi_devices_use_guide.en.md).
@@ -74,7 +78,12 @@ If the installation is successful, the following content will be output:
 3.0.0-rc0
 3.0.0-rc0
 ```
 ```
 
 
-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 install the corresponding version of TensorRT by referring to the [TensorRT documentation](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html). Below is an example of installing TensorRT-8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
+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:
+
+- For CUDA 11.8, the compatible TensorRT version is 8.x (x>=6). PaddleX has completed compatibility testing for Paddle-TensorRT on TensorRT 8.6.1.6, so it is **strongly recommended to install TensorRT 8.6.1.6**.
+- For CUDA 12.6, the compatible TensorRT version is 10.x (x>=5), and it is recommended to install TensorRT 10.5.0.18.
+
+Below is an example of installing TensorRT-8.6.1.6 using the "Tar File Installation" method in a CUDA 11.8 environment:
 
 
 ```bash
 ```bash
 # Download TensorRT tar file
 # Download TensorRT tar file

+ 12 - 3
docs/installation/paddlepaddle_install.md

@@ -44,6 +44,12 @@ 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-8.6.1.6/python/tensorrt-8.6.1-cp310-none-linux_x86_64.whl
+```
+
 ## 基于 pip 安装飞桨
 ## 基于 pip 安装飞桨
 <b>若您通过 pip 安装</b>,请参考下述命令,用 pip 在当前环境中安装飞桨 PaddlePaddle:
 <b>若您通过 pip 安装</b>,请参考下述命令,用 pip 在当前环境中安装飞桨 PaddlePaddle:
 
 
@@ -58,8 +64,6 @@ python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org
 python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
 python -m pip install paddlepaddle-gpu==3.0.0rc0 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/
 ```
 ```
 
 
-Docker 镜像默认支持 [Paddle Inference TensorRT 子图引擎](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/paddle_v3_features/paddle_trt_cn.html)。
-
 > ❗ <b>注</b>:无需关注物理机上的 CUDA 版本,只需关注显卡驱动程序版本。更多飞桨 Wheel 版本请参考[飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html)。
 > ❗ <b>注</b>:无需关注物理机上的 CUDA 版本,只需关注显卡驱动程序版本。更多飞桨 Wheel 版本请参考[飞桨官网](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html)。
 
 
 <b>关于其他硬件安装飞桨,请参考</b>[PaddleX多硬件使用指南](../other_devices_support/multi_devices_use_guide.md)<b>。</b>
 <b>关于其他硬件安装飞桨,请参考</b>[PaddleX多硬件使用指南](../other_devices_support/multi_devices_use_guide.md)<b>。</b>
@@ -75,7 +79,12 @@ python -c "import paddle; print(paddle.__version__)"
 3.0.0-rc0
 3.0.0-rc0
 ```
 ```
 
 
-如果想要使用 [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,下面是在 CUDA11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT-8.6.1.6 的例子:
+如果想要使用 [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:
+
+- 对于 CUDA 11.8,兼容的 TensorRT 版本为 8.x(x>=6)。PaddleX 已在 TensorRT 8.6.1.6 上完成了 Paddle-TensorRT 的兼容性测试,因此**强烈建议安装 TensorRT 8.6.1.6**。
+- 对于 CUDA 12.6,兼容的 TensorRT 版本为 10.x(x>=5),建议安装 TensorRT 10.5.0.18。
+
+下面是在 CUDA11.8 环境下使用 "Tar File Installation" 方式安装 TensoRT-8.6.1.6 的例子:
 
 
 ```bash
 ```bash
 # 下载 TensorRT tar 文件
 # 下载 TensorRT tar 文件

+ 36 - 9
docs/pipeline_deploy/high_performance_inference.en.md

@@ -25,7 +25,7 @@ In actual production environments, many applications have stringent standards fo
 
 
 Before using the high-performance inference plugin, ensure you have completed the installation of PaddleX according to the [PaddleX Local Installation Tutorial](../installation/installation.en.md) and successfully run the quick inference using the PaddleX pipeline command-line instructions or Python script instructions.
 Before using the high-performance inference plugin, ensure you have completed the installation of PaddleX according to the [PaddleX Local Installation Tutorial](../installation/installation.en.md) and successfully run the quick inference using the PaddleX pipeline command-line instructions or Python script instructions.
 
 
-High-performance inference supports processing PaddlePaddle format models and ONNX format models. For ONNX format models, it is recommended to use the [Paddle2ONNX plugin](./paddle2onnx.en.md) for conversion. If multiple format models exist in the model directory, they will be automatically selected as needed.
+High-performance inference supports processing PaddlePaddle static models( `.pdmodel`, `.json` ) and ONNX format models( `.onnx` )**. For ONNX format models, it is recommended to use the [Paddle2ONNX plugin](./paddle2onnx.en.md) for conversion. If multiple format models exist in the model directory, PaddleX will automatically select them as needed.
 
 
 ### 1.1 Installing the High-Performance Inference Plugin
 ### 1.1 Installing the High-Performance Inference Plugin
 
 
@@ -47,7 +47,7 @@ The processor architectures, operating systems, device types, and Python version
     <td>3.8–3.12</td>
     <td>3.8–3.12</td>
   </tr>
   </tr>
   <tr>
   <tr>
-    <td>GPU (CUDA 11.8 + cuDNN 8.6)</td>
+    <td>GPU (CUDA 11.8 + cuDNN 8.9)</td>
     <td>3.8–3.12</td>
     <td>3.8–3.12</td>
   </tr>
   </tr>
   <tr>
   <tr>
@@ -82,7 +82,7 @@ Refer to [Get PaddleX based on Docker](../installation/installation.en.md#21-obt
         <tr>
         <tr>
             <td>GPU</td>
             <td>GPU</td>
             <td><code>paddlex --install hpi-gpu</code></td>
             <td><code>paddlex --install hpi-gpu</code></td>
-            <td>Installs the GPU version of high-performance inference.<br />Includes all features of the CPU version, no need to install the CPU version separately.</td>
+            <td>Installs the GPU version of high-performance inference.<br />Includes all features of the CPU version.</td>
         </tr>
         </tr>
         <tr>
         <tr>
             <td>NPU</td>
             <td>NPU</td>
@@ -94,17 +94,44 @@ Refer to [Get PaddleX based on Docker](../installation/installation.en.md#21-obt
 
 
 #### (2) Local Installation of High-Performance Inference Plugin:
 #### (2) Local Installation of High-Performance Inference Plugin:
 
 
-After locally [installing CUDA 11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive) and [installing cuDNN 8.6](https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-860/install-guide/index.html), execute the above installation commands.
+##### Installing the High-Performance Inference Plugin for CPU:
+
+Execute:
+
+```bash
+paddlex --install hpi-cpu
+```
+
+##### Installing the High-Performance Inference Plugin for GPU:
+
+Refer to the [NVIDIA official website](https://developer.nvidia.com/) to install CUDA and cuDNN locally, then execute:
+
+```bash
+paddlex --install hpi-gpu
+```
+
+The required CUDA and cuDNN versions can be obtained through the following commands:
+
+```bash
+# CUDA version
+pip list | grep nvidia-cuda
+# cuDNN version
+pip list | grep nvidia-cudnn
+```
+
+Reference documents for installing CUDA 11.8 and cuDNN 8.9:
+- [Install CUDA 11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive)
+- [Install cuDNN 8.9](https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-890/install-guide/index.html)
 
 
 **Notes**:
 **Notes**:
 
 
-1. **GPU only supports CUDA 11.8 + cuDNN 8.6**, and CUDA 12.6 is under support.
+1. **GPUs only support CUDA 11.8 + cuDNN 8.9**, and support for CUDA 12.6 is under development.
 
 
-2. Only one version of the high-performance inference plugin can exist in the same environment.
+2. Only one version of the high-performance inference plugin should exist in the same environment.
 
 
-3. For NPU device usage instructions, refer to the [Ascend NPU High-Performance Inference Tutorial](../practical_tutorials/high_performance_npu_tutorial.en.md).
+3. For instructions on high-performance inference using NPU devices, refer to the [Ascend NPU High-Performance Inference Tutorial](../practical_tutorials/high_performance_npu_tutorial.md).
 
 
-4. Windows only supports installing and using the high-performance inference plugin based on Docker.
+4. Windows only supports installing and using the high-performance inference plugin via Docker.
 
 
 ### 1.2 Enabling High-Performance Inference
 ### 1.2 Enabling High-Performance Inference
 
 
@@ -255,7 +282,7 @@ The available options for `backend` are shown in the following table:
   </tr>
   </tr>
   <tr>
   <tr>
     <td><code>om</code></td>
     <td><code>om</code></td>
-    <td>OM, a inference engine of offline model format customized for Huawei Ascend NPU, deeply optimized for hardware to reduce operator computation time and scheduling time, effectively improving inference performance.</td>
+    <td>a inference engine of offline model format customized for Huawei Ascend NPU, deeply optimized for hardware to reduce operator computation time and scheduling time, effectively improving inference performance.</td>
     <td>NPU</td>
     <td>NPU</td>
   </tr>
   </tr>
 </table>
 </table>

+ 36 - 9
docs/pipeline_deploy/high_performance_inference.md

@@ -25,7 +25,7 @@ comments: true
 
 
 使用高性能推理插件前,请确保您已经按照[PaddleX本地安装教程](../installation/installation.md) 完成了PaddleX的安装,且按照PaddleX产线命令行使用说明或PaddleX产线Python脚本使用说明跑通了产线的快速推理。
 使用高性能推理插件前,请确保您已经按照[PaddleX本地安装教程](../installation/installation.md) 完成了PaddleX的安装,且按照PaddleX产线命令行使用说明或PaddleX产线Python脚本使用说明跑通了产线的快速推理。
 
 
-高性能推理支持处理 PaddlePaddle 格式模型和 ONNX 格式模型,对于 ONNX 格式模型建议使用[Paddle2ONNX 插件](./paddle2onnx.md)转换得到。如果模型目录中存在多种格式的模型,会根据需要自动选择。
+高性能推理支持处理 **PaddlePaddle 静态图模型( `.pdmodel`、 `.json` )** 和 **ONNX 格式模型( `.onnx` )**。对于 ONNX 格式模型,建议使用[Paddle2ONNX 插件](./paddle2onnx.md)转换得到。如果模型目录中存在多种格式的模型,PaddleX 会根据需要自动选择。
 
 
 ### 1.1 安装高性能推理插件
 ### 1.1 安装高性能推理插件
 
 
@@ -47,7 +47,7 @@ comments: true
     <td>3.8–3.12</td>
     <td>3.8–3.12</td>
   </tr>
   </tr>
   <tr>
   <tr>
-    <td>GPU&nbsp;(CUDA&nbsp;11.8&nbsp;+&nbsp;cuDNN&nbsp;8.6)</td>
+    <td>GPU&nbsp;(CUDA&nbsp;11.8&nbsp;+&nbsp;cuDNN&nbsp;8.9)</td>
     <td>3.8–3.12</td>
     <td>3.8–3.12</td>
   </tr>
   </tr>
   <tr>
   <tr>
@@ -82,7 +82,7 @@ comments: true
           <tr>
           <tr>
               <td>GPU</td>
               <td>GPU</td>
               <td><code>paddlex --install hpi-gpu</code></td>
               <td><code>paddlex --install hpi-gpu</code></td>
-              <td>安装 GPU 版本的高性能推理功能。<br />包含了 CPU 版本的所有功能,无需再单独安装 CPU 版本。</td>
+              <td>安装 GPU 版本的高性能推理功能。<br />包含了 CPU 版本的所有功能。</td>
           </tr>
           </tr>
           <tr>
           <tr>
               <td>NPU</td>
               <td>NPU</td>
@@ -94,17 +94,44 @@ comments: true
 
 
 #### (2) 本地安装高性能推理插件:
 #### (2) 本地安装高性能推理插件:
 
 
-需要本地 [安装CUDA 11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive) 和 [安装cuDNN 8.6](https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-860/install-guide/index.html) 后执行上面的安装指令。
+##### 安装 CPU 版本的高性能推理插件:
+
+执行:
+
+```bash
+paddlex --install hpi-cpu
+```
+
+##### 安装 GPU 版本的高性能推理插件:
+
+参考 [NVIDIA 官网](https://developer.nvidia.com/) 本地安装 CUDA 和 cuDNN,再执行:
+
+```bash
+paddlex --install hpi-gpu
+```
+
+所需的 CUDA 和 cuDNN 版本可以通过如下方式获取:
+
+```bash
+# CUDA 版本
+pip list | grep nvidia-cuda
+# cuDNN 版本
+pip list | grep nvidia-cudnn
+```
+
+安装 CUDA 11.8 和 cuDNN 8.9 的参考文档:
+- [安装CUDA 11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive)
+- [安装cuDNN 8.9](https://docs.nvidia.com/deeplearning/cudnn/archives/cudnn-890/install-guide/index.html)
 
 
 **注意:**
 **注意:**
 
 
-1. **GPU 只支持 CUDA 11.8 + cuDNN8.6**,CUDA 12.6 已经在支持中。
+1. **GPU 只支持 CUDA 11.8 + cuDNN8.9**,CUDA 12.6 已经在支持中。
 
 
-2. 同一环境下只能存在一个高性能推理插件版本。
+2. 同一环境下只应该存在一个高性能推理插件版本。
 
 
-3. NPU 设备的使用说明参考 [昇腾 NPU 高性能推理教程](../practical_tutorials/high_performance_npu_tutorial.md)。
+3. NPU 设备的高性能推理使用说明参考 [昇腾 NPU 高性能推理教程](../practical_tutorials/high_performance_npu_tutorial.md)。
 
 
-3. Windows 只支持基于 Docker 安装和使用高性能推理插件。
+4. Windows 只支持基于 Docker 安装和使用高性能推理插件。
 
 
 ### 1.2 启用高性能推理插件
 ### 1.2 启用高性能推理插件
 
 
@@ -255,7 +282,7 @@ output = model.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/
   </tr>
   </tr>
   <tr>
   <tr>
     <td><code>om</code></td>
     <td><code>om</code></td>
-    <td>OM,华为昇腾NPU定制的离线模型格式对应的推理引擎,针对硬件进行了深度优化,减少算子计算时间和调度时间,能够有效提升推理性能。</td>
+    <td>华为昇腾NPU定制的离线模型格式对应的推理引擎,针对硬件进行了深度优化,减少算子计算时间和调度时间,能够有效提升推理性能。</td>
     <td>NPU</td>
     <td>NPU</td>
   </tr>
   </tr>
 </table>
 </table>

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

@@ -1,6 +1,6 @@
 # Installation and Usage of the Paddle2ONNX Plugin
 # Installation and Usage of the Paddle2ONNX Plugin
 
 
-The Paddle2ONNX plugin for PaddleX provides the ability to convert PaddlePaddle format models to ONNX format models, leveraging the underlying [Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX).
+The Paddle2ONNX plugin for PaddleX provides the ability to convert PaddlePaddle static models to ONNX format models, leveraging the underlying [Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX).
 
 
 ## 1. Installation
 ## 1. Installation
 
 

+ 1 - 1
docs/pipeline_deploy/paddle2onnx.md

@@ -1,7 +1,7 @@
 
 
 # Paddle2ONNX 插件的安装与使用
 # Paddle2ONNX 插件的安装与使用
 
 
-PaddleX 的 Paddle2ONNX 插件提供了将 PaddlePaddle 格式模型转化到 ONNX 格式模型的能力,底层使用[Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX)。
+PaddleX 的 Paddle2ONNX 插件提供了将 PaddlePaddle 静态图模型转化到 ONNX 格式模型的能力,底层使用[Paddle2ONNX](https://github.com/PaddlePaddle/Paddle2ONNX)。
 
 
 ## 1. 安装
 ## 1. 安装