From fdb2595bec1154dc52062cde17c4f9c5efc325cd Mon Sep 17 00:00:00 2001 From: zhangshijin Date: Thu, 12 Mar 2020 10:47:17 +0800 Subject: [PATCH] Fix arm compiling errors, refactor build_mlu.sh (#15) --- lite/tools/build_mlu.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lite/tools/build_mlu.sh b/lite/tools/build_mlu.sh index 1912efda5e..6dd441eef9 100755 --- a/lite/tools/build_mlu.sh +++ b/lite/tools/build_mlu.sh @@ -23,7 +23,7 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \ -DWITH_PYTHON=OFF \ -DLITE_WITH_ARM=OFF" -readonly NUM_CORES_FOR_COMPILE=${LITE_BUILD_THREADS:-1} +readonly NUM_CORES_FOR_COMPILE=${LITE_BUILD_THREADS:-4} readonly THIRDPARTY_TAR=https://paddle-inference-dist.bj.bcebos.com/PaddleLite/third-party-05b862.tar.gz readonly workspace=$(pwd) @@ -35,7 +35,7 @@ function prepare_thirdparty { if [ ! -f $workspace/third-party-05b862.tar.gz ]; then wget $THIRDPARTY_TAR fi - tar xzf third-party-05b862.tar.gz + tar xvf third-party-05b862.tar.gz else # git submodule update --init --recursive echo "third-party is in ready" @@ -62,12 +62,12 @@ function prepare_workspace { } function build_mlu { + prepare_workspace build_dir=${workspace}/build.lite.mlu mkdir -p $build_dir cd $build_dir export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/third_party/install/mklml/lib" - prepare_workspace cmake .. \ ${CMAKE_COMMON_OPTIONS} \ -DWITH_GPU=OFF \ @@ -77,7 +77,7 @@ function build_mlu { -DLITE_WITH_MLU=ON \ -DLITE_BUILD_EXTRA=${BUILD_EXTRA} \ -DWITH_TESTING=${WITH_TESTING} \ - -DMLU_SDK_ROOT=${XPU_SDK_ROOT} + -DNEUWARE_HOME=${NEUWARE_HOME} make $TARGET_NAME -j$NUM_CORES_FOR_COMPILE -- GitLab