diff --git a/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_cn.rst b/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_cn.rst index 648290ca299f1858bd18b54f44d58fb187fdd8a6..8780328aaedb1a8311efb39d7fca7d92981f8b21 100644 --- a/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_cn.rst +++ b/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_cn.rst @@ -43,14 +43,24 @@ WITH_NV_JETSON OFF 在NV Jetson硬件上编译时需 .. code-block:: bash - git clone https://github.com/paddlepaddle/paddle + git clone https://github.com/paddlepaddle/Paddle + cd Paddle # 建议使用git checkout切换到Paddle稳定的版本,如: git checkout v1.7.2 +**note**: 如果您是多卡机器,建议安装NCCL;如果您是单卡机器则可以在编译时显示指定WITH_NCCL=OFF来跳过这一步。注意如果WITH_NCCL=ON,且没有安装NCCL,则编译会报错。 + +.. code-block:: bash + + git clone https://github.com/NVIDIA/nccl.git + cd nccl + make -j4 + make install + **Server端预测库源码编译** -下面的代码片段配制编译选项并进行编译(需要将PADDLE_ROOT替换为PaddlePaddle预测库的安装路径): +下面的代码片段配制编译选项并进行编译(需要将PADDLE_ROOT替换为PaddlePaddle预测库的安装路径,WITH_NCCL根据实际情况进行修改): .. code-block:: bash @@ -64,6 +74,7 @@ WITH_NV_JETSON OFF 在NV Jetson硬件上编译时需 -DWITH_MKL=OFF \ -DWITH_GPU=OFF \ -DON_INFER=ON \ + -DWITH_NCCL=OFF \ .. make make inference_lib_dist diff --git a/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_en.rst b/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_en.rst index 0e8983df339ab238938616c3512572b29f7ad0d8..18fc43abdd3d3ae1dbd61439911009d0beff2cf1 100644 --- a/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_en.rst +++ b/doc/fluid/advanced_guide/inference_deployment/inference/build_and_install_lib_en.rst @@ -40,23 +40,29 @@ WITH_NV_JETSON OFF build inference libs on NV Jetson It is recommended to configure options according to the recommended values to avoid linking unnecessary libraries. Other options can be set if it is necessary. -Firstly we pull the latest code from github and install nccl. +Firstly we pull the latest code from github. .. code-block:: bash - git clone https://github.com/paddlepaddle/paddle - # Use git checkout to switch to stable versions such as v1.6.2 - git checkout v1.6.2 + git clone https://github.com/paddlepaddle/Paddle + cd Paddle + # Use git checkout to switch to stable versions such as v1.7.2 + git checkout v1.7.2 + + +**note**: If your environment is a multi-card machine, it is recommended to install nccl; otherwise, you can skip this step by specifying WITH_NCCL = OFF during compilation. Note that if WITH_NCCL = ON, and NCCL is not installed, the compiler will report an error. + +.. code-block:: bash git clone https://github.com/NVIDIA/nccl.git + cd nccl make -j4 make install -**note**: nccl is not used but still needed in building. This dependence will be removed later. **build inference libs on server** -Following codes set the configurations and execute building(PADDLE_ROOT should be set to the actual installing path of inference libs). +Following codes set the configurations and execute building(PADDLE_ROOT should be set to the actual installing path of inference libs, WITH_NCCL should be modified according to the actual environment.). .. code-block:: bash @@ -71,6 +77,7 @@ Following codes set the configurations and execute building(PADDLE_ROOT should b -DWITH_MKL=OFF \ -DWITH_GPU=OFF \ -DON_INFER=ON \ + -DWITH_NCCL=OFF \ .. make make inference_lib_dist