!13448 [MSLITE][Develop] Modify lite package script

From: @sunsuodong
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhang_xue_tong
This commit is contained in:
mindspore-ci-bot 2021-03-17 14:53:16 +08:00 committed by Gitee
commit 4a52684abc
2 changed files with 13 additions and 5 deletions

View File

@ -25,6 +25,8 @@ SET MODEL_PATH=%MODEL_PATH_BASE:"=%\models\hiai
SET BENCHMARK_BASE=%BASEPATH:"=%\output\benchmark
SET MODEL_CONFIG=%BASEPATH%\win_models.cfg
for /f "tokens=3 delims=-" %%i in ('dir /b %TOOL_PATH%\mindspore-lite-*-inference-win-x64.zip') do set VERSION=%%i
cd /d %BASEPATH%
IF EXIST "%BASEPATH%/output" (
rd /s /q output
@ -38,15 +40,15 @@ md benchmark
SET RET_CODE=0
SET SO_PATH=mindspore-lite-1.2.0-inference-win-x64
SET SO_PATH=mindspore-lite-%VERSION%-inference-win-x64
IF "%3%" == "sse" (
SET SO_PATH=mindspore-lite-1.2.0-inference-win-x64-sse
SET SO_PATH=mindspore-lite-%VERSION%-inference-win-x64-sse
)
IF "%3%" == "avx" (
SET SO_PATH=mindspore-lite-1.2.0-inference-win-x64-avx
SET SO_PATH=mindspore-lite-%VERSION%-inference-win-x64-avx
)
IF "%3%" == "avx512" (
SET SO_PATH=mindspore-lite-1.2.0-inference-win-x64-avx512
SET SO_PATH=mindspore-lite-%VERSION%-inference-win-x64-avx512
)
7z x -r "%TOOL_PATH%/%SO_PATH%.zip" -o"%BENCHMARK_BASE%"
IF NOT %errorlevel% == 0 (

View File

@ -65,7 +65,7 @@ function android_release_package()
mkdir -p ${output_path}/release/android/
mv ${src_inference_pkg_name} ${dst_pkg_name}
# Copy java runtime to Android package
cp ${input_path}/aar/* ${dst_pkg_name}
cp ${input_path}/aar/mindspore-lite-*maven*.zip ${dst_pkg_name}
tar -czf ${output_path}/release/android/${dst_pkg_name}.tar.gz ${dst_pkg_name}
cd ${output_path}/release/android/
sha256sum ${dst_pkg_name}.tar.gz > ${dst_pkg_name}.tar.gz.sha256
@ -83,16 +83,20 @@ function linux_release_package()
{
src_inference_pkg_name="mindspore-lite-${version}-inference-linux-x64-avx"
src_train_pkg_name="mindspore-lite-${version}-train-linux-x64"
src_jar_pkg_name="mindspore-lite-${version}-inference-linux-x64-jar"
dst_pkg_name="mindspore-lite-${version}-linux-x64"
rm -rf ${src_inference_pkg_name}
rm -rf ${src_train_pkg_name}
rm -rf ${src_jar_pkg_name}
rm -rf ${dst_pkg_name}
tar -xzf ${input_path}/ubuntu_x86/${src_inference_pkg_name}.tar.gz
tar -xzf ${input_path}/ubuntu_x86/${src_train_pkg_name}.tar.gz
tar -xzf ${input_path}/aar/${src_jar_pkg_name}.tar.gz
cp -r ${src_train_pkg_name}/tools/benchmark_train/ ${src_inference_pkg_name}/tools/
cp -r ${src_train_pkg_name}/train/ ${src_inference_pkg_name}/
cp -r ${src_jar_pkg_name}/jar/ ${src_inference_pkg_name}/inference/lib/
mkdir -p ${output_path}/release/linux/
mv ${src_inference_pkg_name} ${dst_pkg_name}
@ -103,7 +107,9 @@ function linux_release_package()
verify_every_file ${src_train_pkg_name}/tools/benchmark_train/ ${dst_pkg_name}
verify_every_file ${src_train_pkg_name}/train/ ${dst_pkg_name}
verify_every_file ${src_jar_pkg_name}/ ${dst_pkg_name}
rm -rf ${src_train_pkg_name}
rm -rf ${src_jar_pkg_name}
rm -rf ${dst_pkg_name}
}