From 0af4cbc647f65b233b3adaa5aa2bee7e1d280575 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Mon, 27 Jun 2022 19:29:55 +0800 Subject: [PATCH] support mac m1 arm compile in paddle_build (#43834) --- paddle/scripts/paddle_build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index c253cb2d82..f7e76982ce 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -199,6 +199,7 @@ function cmake_base() { if [ "$SYSTEM" == "Darwin" ]; then WITH_DISTRIBUTE="OFF" WITH_AVX=${WITH_AVX:-ON} + WITH_ARM=${WITH_ARM:-OFF} INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-~/.cache/inference_demo} else INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo} @@ -571,6 +572,15 @@ function combine_avx_noavx_build() { build_base } +function mac_m1_arm_build() { + mkdir -p ${PADDLE_ROOT}/build + cd ${PADDLE_ROOT}/build + WITH_AVX=OFF + WITH_ARM=ON + cmake_base ${PYTHON_ABI:-""} + build_base +} + function run_brpc_test() { mkdir -p ${PADDLE_ROOT}/build @@ -3407,6 +3417,10 @@ function main() { combine_avx_noavx_build gen_dockerfile ${PYTHON_ABI:-""} ;; + mac_m1_arm) + mac_m1_arm_build + gen_dockerfile ${PYTHON_ABI:-""} + ;; combine_avx_noavx_build_and_test) combine_avx_noavx_build gen_dockerfile ${PYTHON_ABI:-""} -- GitLab