未验证 提交 61bededd 编写于 作者: P pangyoki 提交者: GitHub

Cherry-pick PR43834, support mac m1 arm compile in paddle_build (#43834) (#43872)

上级 17a2003d
...@@ -201,6 +201,7 @@ function cmake_base() { ...@@ -201,6 +201,7 @@ function cmake_base() {
if [ "$SYSTEM" == "Darwin" ]; then if [ "$SYSTEM" == "Darwin" ]; then
WITH_DISTRIBUTE="OFF" WITH_DISTRIBUTE="OFF"
WITH_AVX=${WITH_AVX:-ON} WITH_AVX=${WITH_AVX:-ON}
WITH_ARM=${WITH_ARM:-OFF}
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-~/.cache/inference_demo} INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-~/.cache/inference_demo}
else else
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo} INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo}
...@@ -567,6 +568,15 @@ function combine_avx_noavx_build() { ...@@ -567,6 +568,15 @@ function combine_avx_noavx_build() {
build_base 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() { function run_brpc_test() {
mkdir -p ${PADDLE_ROOT}/build mkdir -p ${PADDLE_ROOT}/build
...@@ -3079,6 +3089,10 @@ function main() { ...@@ -3079,6 +3089,10 @@ function main() {
combine_avx_noavx_build combine_avx_noavx_build
gen_dockerfile ${PYTHON_ABI:-""} 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_and_test)
combine_avx_noavx_build combine_avx_noavx_build
gen_dockerfile ${PYTHON_ABI:-""} gen_dockerfile ${PYTHON_ABI:-""}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册