Skip to content

Commit dd3a184

Browse files
Update third-party-commitID.tar.gz (#7636) (#7654)
1 parent 4620a8e commit dd3a184

File tree

12 files changed

+112
-84
lines changed

12 files changed

+112
-84
lines changed

lite/tools/build.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ MIN_ANDROID_API_LEVEL_ARMV8=21
5656
ANDROID_API_LEVEL="Default"
5757
CMAKE_API_LEVEL_OPTIONS=""
5858

59-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
59+
# url that stores third-party tar.gz file to accelerate third-party lib installation
60+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
61+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
6062
readonly workspace=$PWD
6163

6264
function readlinkf() {
@@ -100,13 +102,13 @@ function prepare_opencl_source_code {
100102
}
101103

102104
function prepare_thirdparty {
103-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
105+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
104106
rm -rf $workspace/third-party
105107

106-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
107-
wget $THIRDPARTY_TAR
108+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
109+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
108110
fi
109-
tar xzf third-party-ea5576.tar.gz
111+
tar xzf $THIRDPARTY_TAR
110112
else
111113
git submodule update --init --recursive
112114
fi

lite/tools/build_android.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4}
6767
#####################################################################################################
6868
# 2. local variables, these variables should not be changed.
6969
#####################################################################################################
70-
# url that stores third-party zip file to accelerate third-paty lib installation
71-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
70+
# url that stores third-party tar.gz file to accelerate third-party lib installation
71+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
72+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
7273
# absolute path of Paddle-Lite.
7374
readonly workspace=$PWD/$(dirname $0)/../../
7475
# basic options for android compiling.
@@ -141,13 +142,13 @@ function prepare_opencl_source_code {
141142
# 3.3 prepare third_party libraries for compiling
142143
# here we store third_party libraries into Paddle-Lite/third-party
143144
function prepare_thirdparty {
144-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
145+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
145146
rm -rf $workspace/third-party
146147

147-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
148-
wget $THIRDPARTY_TAR
148+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
149+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
149150
fi
150-
tar xzf third-party-ea5576.tar.gz
151+
tar xzf $THIRDPARTY_TAR
151152
else
152153
git submodule update --init --recursive
153154
fi

lite/tools/build_bm.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,19 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \
2828

2929
readonly NUM_CORES_FOR_COMPILE=${LITE_BUILD_THREADS:-1}
3030

31-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
31+
# url that stores third-party tar.gz file to accelerate third-party lib installation
32+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
33+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
3234
readonly workspace=$(pwd)
3335

3436
function prepare_thirdparty {
35-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
37+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
3638
rm -rf $workspace/third-party
3739

38-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
39-
wget $THIRDPARTY_TAR
40+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
41+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
4042
fi
41-
tar xzf third-party-ea5576.tar.gz
43+
tar xzf $THIRDPARTY_TAR
4244
else
4345
git submodule update --init --recursive
4446
fi
@@ -116,15 +118,15 @@ function main {
116118
shift
117119
;;
118120
--dynamic=*)
119-
BM_DYNAMIC_COMPILE=${i#*=}
121+
BM_DYNAMIC_COMPILE=${i#*=}
120122
shift
121123
;;
122124
--save_bmodel=*)
123-
BM_SAVE_BMODEL=${i#*=}
125+
BM_SAVE_BMODEL=${i#*=}
124126
shift
125127
;;
126128
--save_umodel=*)
127-
BM_SAVE_UMODEL=${i#*=}
129+
BM_SAVE_UMODEL=${i#*=}
128130
shift
129131
;;
130132
*)

lite/tools/build_linux.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4}
7878
#####################################################################################################
7979
# 2. local variables, these variables should not be changed.
8080
#####################################################################################################
81-
# url that stores third-party zip file to accelerate third-paty lib installation
82-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
81+
# url that stores third-party tar.gz file to accelerate third-party lib installation
82+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
83+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
84+
8385
# absolute path of Paddle-Lite.
8486
readonly workspace=$PWD/$(dirname $0)/../../
8587
# basic options for linux compiling.
@@ -247,12 +249,12 @@ function prepare_opencl_source_code {
247249
# 3.3 prepare third_party libraries for compiling
248250
# here we store third_party libraries into Paddle-Lite/third-party
249251
function prepare_thirdparty {
250-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
252+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
251253
rm -rf $workspace/third-party
252-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
253-
wget $THIRDPARTY_TAR
254+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
255+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
254256
fi
255-
tar xzf third-party-ea5576.tar.gz
257+
tar xzf $THIRDPARTY_TAR
256258
else
257259
git submodule update --init --recursive
258260
fi

lite/tools/build_macos.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4}
5656
#####################################################################################################
5757
# 2. local variables, these variables should not be changed.
5858
#####################################################################################################
59+
# url that stores third-party tar.gz file to accelerate third-party lib installation
60+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
61+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
62+
5963
# on mac environment, we should expand the maximum file num to compile successfully
6064
os_name=`uname -s`
6165
if [ ${os_name} == "Darwin" ]; then
@@ -95,13 +99,13 @@ function prepare_opencl_source_code {
9599
}
96100

97101
function prepare_thirdparty {
98-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
102+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
99103
rm -rf $workspace/third-party
100104

101-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
102-
wget $THIRDPARTY_TAR
105+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
106+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
103107
fi
104-
tar xzf third-party-ea5576.tar.gz
108+
tar xzf $THIRDPARTY_TAR
105109
else
106110
git submodule update --init --recursive
107111
fi

lite/tools/build_mlu.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \
2929

3030
readonly NUM_CORES_FOR_COMPILE=${LITE_BUILD_THREADS:-8}
3131

32-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
32+
# url that stores third-party tar.gz file to accelerate third-party lib installation
33+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
34+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
3335
readonly workspace=$(pwd)
3436

3537
function prepare_thirdparty {
36-
if [ ! -d $workspace/third-party ]; then
38+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
3739
rm -rf $workspace/third-party
40+
41+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
42+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
43+
fi
44+
tar xzf $THIRDPARTY_TAR
45+
else
46+
git submodule update --init --recursive
3847
fi
39-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
40-
wget $THIRDPARTY_TAR
41-
fi
42-
tar xvf third-party-ea5576.tar.gz
4348
}
4449

4550
# for code gen, a source file is generated after a test, but is dependended by some targets in cmake.

lite/tools/build_npu.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function print_usage {
2828
echo
2929
}
3030

31-
# for code gen, a source file is generated after a test,
31+
# for code gen, a source file is generated after a test,
3232
# but is dependended by some targets in cmake.
3333
# here we fake an empty file to make cmake works.
3434
function prepare_workspace {
@@ -45,16 +45,18 @@ function prepare_workspace {
4545
}
4646

4747
function prepare_thirdparty {
48-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
48+
# url that stores third-party tar.gz file to accelerate third-party lib installation
49+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
50+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
4951

5052
readonly workspace=$PWD
51-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
53+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
5254
rm -rf $workspace/third-party
5355

54-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
55-
wget $THIRDPARTY_TAR
56+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
57+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
5658
fi
57-
tar xzf third-party-ea5576.tar.gz
59+
tar xzf $THIRDPARTY_TAR
5860
else
5961
git submodule update --init --recursive
6062
fi

lite/tools/build_rknpu.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55
ARM_OS="armlinux" # android only yet
66
ARM_ABI="armv8" # armv8, armv7
77
ARM_LANG="gcc" # gcc only yet
8-
DDK_ROOT="$(pwd)/rknpu"
8+
DDK_ROOT="$(pwd)/rknpu"
99
TARGET_NAME="test_subgraph_pass" # default target
1010
BUILD_EXTRA=OFF # ON(with sequence ops)/OFF
1111
WITH_TESTING=ON # ON/OFF
@@ -25,7 +25,7 @@ function print_usage {
2525
echo
2626
}
2727

28-
# for code gen, a source file is generated after a test,
28+
# for code gen, a source file is generated after a test,
2929
# but is dependended by some targets in cmake.
3030
# here we fake an empty file to make cmake works.
3131
function prepare_workspace {
@@ -42,16 +42,18 @@ function prepare_workspace {
4242
}
4343

4444
function prepare_thirdparty {
45-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
45+
# url that stores third-party tar.gz file to accelerate third-party lib installation
46+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
47+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
4648

4749
readonly workspace=$PWD
48-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
50+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
4951
rm -rf $workspace/third-party
5052

51-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
52-
wget $THIRDPARTY_TAR
53+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
54+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
5355
fi
54-
tar xzf third-party-ea5576.tar.gz
56+
tar xzf $THIRDPARTY_TAR
5557
else
5658
git submodule update --init --recursive
5759
fi

lite/tools/build_windows.bat

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ set CMAKE_GENERATOR=Visual Studio 14 2015
2323
set ARCH=""
2424
set WITH_STRIP=OFF
2525
set OPTMODEL_DIR=""
26-
set THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
26+
set THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
27+
set THIRDPARTY_TAR=third-party-801f670.tar.gz
2728
set BAIDU_XPU_SDK_ROOT=""
2829

2930
set workspace=%source_path%
@@ -213,7 +214,7 @@ goto:eof
213214
call "%vcvarsall_dir%" x86
214215
set ARCH="i386"
215216
)
216-
217+
217218
cmake %root_dir% -G Ninja -DARCH=%ARCH% ^
218219
-DMSVC_STATIC_CRT=%MSVC_STATIC_CRT% ^
219220
-DWITH_MKL=ON ^
@@ -247,36 +248,36 @@ goto:eof
247248

248249
:prepare_thirdparty
249250
if EXIST "%workspace%\third-party" (
250-
if NOT EXIST "%workspace%\third-party-ea5576.tar.gz" (
251-
echo "The directory of third_party exists, the third-party-ea5576.tar.gz not exists."
251+
if NOT EXIST "%workspace%\%THIRDPARTY_TAR%" (
252+
echo "The directory of third_party exists, %THIRDPARTY_TAR% not exists."
252253
git submodule update --init --recursive
253254
call:rm_rebuild_dir "%workspace%\third-party\glog\src\extern_glog-build"
254255
call:rm_rebuild_dir "%workspace%\third-party\protobuf-host\src\extern_protobuf-build"
255256

256257
) else (
257-
echo "The directory of third_party exists, the third-party-ea5576.tar.gz exists."
258+
echo "The directory of third_party exists, the %THIRDPARTY_TAR% exists."
258259
call:rm_rebuild_dir "%workspace%\third-party"
259-
!python_path! %workspace%\lite\tools\untar.py %source_path%\third-party-ea5576.tar.gz %workspace%
260+
!python_path! %workspace%\lite\tools\untar.py %source_path%\%THIRDPARTY_TAR% %workspace%
260261
)
261262
) else (
262-
if NOT EXIST "%workspace%\third-party-ea5576.tar.gz" (
263-
echo "The directory of third_party not exists, the third-party-ea5576.tar.gz not exists."
263+
if NOT EXIST "%workspace%\%THIRDPARTY_TAR%" (
264+
echo "The directory of third_party not exists, the %THIRDPARTY_TAR% not exists."
264265
call:download_third_party
265-
if EXIST "%workspace%\third-party-ea5576.tar.gz" (
266-
!python_path! %workspace%\lite\tools\untar.py %source_path%\third-party-ea5576.tar.gz %workspace%
266+
if EXIST "%workspace%\%THIRDPARTY_TAR%" (
267+
!python_path! %workspace%\lite\tools\untar.py %source_path%\%THIRDPARTY_TAR% %workspace%
267268
) else (
268-
echo "------------Can't download the third-party-ea5576.tar.gz!------"
269+
echo "------------Can't download the %THIRDPARTY_TAR%!------"
269270
)
270271
) else (
271-
echo "The directory of third_party not exists, the third-party-ea5576.tar.gz exists."
272-
!python_path! %workspace%\lite\tools\untar.py %source_path%\third-party-ea5576.tar.gz %workspace%
272+
echo "The directory of third_party not exists, the %THIRDPARTY_TAR% exists."
273+
!python_path! %workspace%\lite\tools\untar.py %source_path%\%THIRDPARTY_TAR% %workspace%
273274
)
274275
)
275276
goto:eof
276277

277278
:download_third_party
278279
powershell.exe (new-object System.Net.WebClient).DownloadFile('%THIRDPARTY_TAR%', ^
279-
'%workspace%\third-party-ea5576.tar.gz')
280+
'%workspace%\%THIRDPARTY_TAR%')
280281
goto:eof
281282

282283
:prepare_opencl_source_code

lite/tools/ci_build.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ NUM_PROC=4
1111
readonly ADB_WORK_DIR="/data/local/tmp"
1212
readonly common_flags="-DWITH_LITE=ON -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DWITH_PYTHON=OFF -DWITH_TESTING=ON -DLITE_WITH_ARM=OFF"
1313

14-
readonly THIRDPARTY_TAR=https://paddlelite-data.bj.bcebos.com/third_party_libs/third-party-ea5576.tar.gz
14+
# url that stores third-party tar.gz file to accelerate third-party lib installation
15+
readonly THIRDPARTY_URL=https://paddlelite-data.bj.bcebos.com/third_party_libs/
16+
readonly THIRDPARTY_TAR=third-party-801f670.tar.gz
17+
1518
readonly workspace=$PWD
1619

1720
NUM_CORES_FOR_COMPILE=${LITE_BUILD_THREADS:-8}
@@ -35,13 +38,13 @@ fi
3538

3639
function prepare_thirdparty {
3740
cd $workspace
38-
if [ ! -d $workspace/third-party -o -f $workspace/third-party-ea5576.tar.gz ]; then
41+
if [ ! -d $workspace/third-party -o -f $workspace/$THIRDPARTY_TAR ]; then
3942
rm -rf $workspace/third-party
4043

41-
if [ ! -f $workspace/third-party-ea5576.tar.gz ]; then
42-
wget $THIRDPARTY_TAR
44+
if [ ! -f $workspace/$THIRDPARTY_TAR ]; then
45+
wget $THIRDPARTY_URL/$THIRDPARTY_TAR
4346
fi
44-
tar xzf third-party-ea5576.tar.gz
47+
tar xzf $THIRDPARTY_TAR
4548
else
4649
git submodule update --init --recursive
4750
fi
@@ -148,7 +151,7 @@ function run_gen_code_test {
148151
# 1. build test_cxx_api
149152
make test_cxx_api -j$NUM_CORES_FOR_COMPILE
150153

151-
# 2. run test_cxx_api_lite in emulator to get opt model
154+
# 2. run test_cxx_api_lite in emulator to get opt model
152155
local test_cxx_api_lite_path=$(find ./lite -name test_cxx_api)
153156
adb -s ${device} push "./third_party/install/lite_naive_model" ${adb_work_dir}
154157
adb -s ${device} push ${test_cxx_api_lite_path} ${adb_work_dir}
@@ -255,8 +258,8 @@ function build_single {
255258
function build {
256259
make lite_compile_deps -j$NUM_CORES_FOR_COMPILE
257260
if [ $LITE_WITH_COVERAGE = "ON" ];then
258-
make coveralls_generate -j
259-
fi
261+
make coveralls_generate -j
262+
fi
260263
# test publish inference lib
261264
# make publish_inference
262265
}
@@ -595,7 +598,7 @@ function run_test_case_on_remote_device {
595598
$remote_device_run $remote_device_name push "$config_dir" "$remote_device_work_dir"
596599
command_line="$command_line --config_dir ./$config_name"
597600
fi
598-
601+
599602
# Run the model on the remote device
600603
$remote_device_run $remote_device_name shell "cd $remote_device_work_dir; export GLOG_v=5; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. $command_line"
601604
}

0 commit comments

Comments
 (0)