diff --git a/lite/tools/build_mlu.sh b/lite/tools/build_mlu.sh index 1912efda5edc6e436cc84dbdf9919a99e1ed3279..6dd441eef9c239b0fe0a98bc34412f940bdf7ba9 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