构建时从 Gitee 下载第三方库的 Paddle
git clone git@gitee.com:PaddleGitee/PaddleGitee.git
cd PaddleGitee
git checkout gitee
x86_64
打开 x64 Native Tools Command Prompt for VS 2019
,执行下列命令:
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install numpy protobuf wheel pyyaml ninja
cmake -S . -B build -G "Ninja" ^
-DCMAKE_BUILD_TYPE=Release ^
-DON_INFER=ON ^
-DWITH_GPU=OFF ^
-DWITH_PYTHON=OFF ^
-DWITH_MKL=ON ^
-DWITH_AVX=ON
cd build
ninja -j8
打开终端,执行下列命令:
ulimit -n 65535
sudo apt install -y bzip2 unrar swig wget patchelf
sudo apt install -y python3 python3-dev python3-pip
pip3 install numpy protobuf wheel pyyaml setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple
x86_64
cmake -S . -B build -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DON_INFER=ON \
-DWITH_GPU=OFF \
-DWITH_PYTHON=OFF
cmake --build . --target third_party -j4
cmake --build . --target inference_lib_dist -j4
AArch64
cmake -S . -B build -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DON_INFER=ON \
-DWITH_GPU=OFF \
-DWITH_PYTHON=OFF \
-DWITH_ARM=ON
cd build
make TARGET=ARMV8 -j4
LoongArch64
cmake -S . -B build -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DON_INFER=ON \
-DWITH_GPU=OFF \
-DWITH_PYTHON=OFF \
-DWITH_MIPS=ON
cd build
make -j4