diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 764a7fbb2dd91879aa7ffd36543d28eb9daa490d..8ce48016d0660212df4b3c75703306e47103d940 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -201,6 +201,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} @@ -567,6 +568,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 @@ -3079,6 +3089,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:-""}