安装nccl:
git clone https://github.com/NVIDIA/nccl.git
cd nccl
make -j4
sudo make install
配置CUDA:
(Bashrc配置:)
export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH
下载Paddle-2.1.0源码并解压:
https://github.com/PaddlePaddle/Paddle/archive/refs/tags/v2.1.0.zip
paddle源码编译
cd Paddle-2.1.0
mkdir build
cd build
cmake .. -DWITH_GPU=ON -DWITH_TENSORRT=ON -DWITH_CONTRIB=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_PYTHON=OFF -DWITH_XBYAK=OFF -DWITH_NV_JETSON=ON -DPY_VERSION=3
make -j4