未验证 提交 0af4cbc6 编写于 作者: P pangyoki 提交者: GitHub

support mac m1 arm compile in paddle_build (#43834)

上级 5dece3f4
...@@ -199,6 +199,7 @@ function cmake_base() { ...@@ -199,6 +199,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}
...@@ -571,6 +572,15 @@ function combine_avx_noavx_build() { ...@@ -571,6 +572,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
...@@ -3407,6 +3417,10 @@ function main() { ...@@ -3407,6 +3417,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.
先完成此消息的编辑!
想要评论请 注册