Skip to content

Commit 61beded

Browse files
authored
Cherry-pick PR43834, support mac m1 arm compile in paddle_build (#43834) (#43872)
1 parent 17a2003 commit 61beded

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ function cmake_base() {
201201
if [ "$SYSTEM" == "Darwin" ]; then
202202
WITH_DISTRIBUTE="OFF"
203203
WITH_AVX=${WITH_AVX:-ON}
204+
WITH_ARM=${WITH_ARM:-OFF}
204205
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-~/.cache/inference_demo}
205206
else
206207
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo}
@@ -567,6 +568,15 @@ function combine_avx_noavx_build() {
567568
build_base
568569
}
569570

571+
function mac_m1_arm_build() {
572+
mkdir -p ${PADDLE_ROOT}/build
573+
cd ${PADDLE_ROOT}/build
574+
WITH_AVX=OFF
575+
WITH_ARM=ON
576+
cmake_base ${PYTHON_ABI:-""}
577+
build_base
578+
}
579+
570580

571581
function run_brpc_test() {
572582
mkdir -p ${PADDLE_ROOT}/build
@@ -3079,6 +3089,10 @@ function main() {
30793089
combine_avx_noavx_build
30803090
gen_dockerfile ${PYTHON_ABI:-""}
30813091
;;
3092+
mac_m1_arm)
3093+
mac_m1_arm_build
3094+
gen_dockerfile ${PYTHON_ABI:-""}
3095+
;;
30823096
combine_avx_noavx_build_and_test)
30833097
combine_avx_noavx_build
30843098
gen_dockerfile ${PYTHON_ABI:-""}

0 commit comments

Comments
 (0)