提交 fdb2595b 编写于 作者: Z zhangshijin 提交者: jackzhang235

Fix arm compiling errors, refactor build_mlu.sh (#15)

上级 554fbfb1
...@@ -23,7 +23,7 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \ ...@@ -23,7 +23,7 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \
-DWITH_PYTHON=OFF \ -DWITH_PYTHON=OFF \
-DLITE_WITH_ARM=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 THIRDPARTY_TAR=https://paddle-inference-dist.bj.bcebos.com/PaddleLite/third-party-05b862.tar.gz
readonly workspace=$(pwd) readonly workspace=$(pwd)
...@@ -35,7 +35,7 @@ function prepare_thirdparty { ...@@ -35,7 +35,7 @@ function prepare_thirdparty {
if [ ! -f $workspace/third-party-05b862.tar.gz ]; then if [ ! -f $workspace/third-party-05b862.tar.gz ]; then
wget $THIRDPARTY_TAR wget $THIRDPARTY_TAR
fi fi
tar xzf third-party-05b862.tar.gz tar xvf third-party-05b862.tar.gz
else else
# git submodule update --init --recursive # git submodule update --init --recursive
echo "third-party is in ready" echo "third-party is in ready"
...@@ -62,12 +62,12 @@ function prepare_workspace { ...@@ -62,12 +62,12 @@ function prepare_workspace {
} }
function build_mlu { function build_mlu {
prepare_workspace
build_dir=${workspace}/build.lite.mlu build_dir=${workspace}/build.lite.mlu
mkdir -p $build_dir mkdir -p $build_dir
cd $build_dir cd $build_dir
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/third_party/install/mklml/lib" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/third_party/install/mklml/lib"
prepare_workspace
cmake .. \ cmake .. \
${CMAKE_COMMON_OPTIONS} \ ${CMAKE_COMMON_OPTIONS} \
-DWITH_GPU=OFF \ -DWITH_GPU=OFF \
...@@ -77,7 +77,7 @@ function build_mlu { ...@@ -77,7 +77,7 @@ function build_mlu {
-DLITE_WITH_MLU=ON \ -DLITE_WITH_MLU=ON \
-DLITE_BUILD_EXTRA=${BUILD_EXTRA} \ -DLITE_BUILD_EXTRA=${BUILD_EXTRA} \
-DWITH_TESTING=${WITH_TESTING} \ -DWITH_TESTING=${WITH_TESTING} \
-DMLU_SDK_ROOT=${XPU_SDK_ROOT} -DNEUWARE_HOME=${NEUWARE_HOME}
make $TARGET_NAME -j$NUM_CORES_FOR_COMPILE make $TARGET_NAME -j$NUM_CORES_FOR_COMPILE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册