未验证 提交 e1aa4def 编写于 作者: P Peihan 提交者: GitHub

add win_capi_tar in paddle_build.bat (#33414)

上级 529245bf
......@@ -218,7 +218,8 @@ set CUDA_ARCH_NAME=All
call :cmake || goto cmake_error
call :build || goto build_error
call :zip_file || goto zip_file_error
call :zip_cc_file || goto zip_cc_file_error
call :zip_c_file || goto zip_c_file_error
goto:success
rem "Other configurations are added here"
......@@ -690,7 +691,7 @@ goto:eof
exit /b 1
rem ---------------------------------------------------------------------------------------------
:zip_file
:zip_cc_file
tree /F %cd%\paddle_inference_install_dir\paddle
if exist paddle_inference.zip del paddle_inference.zip
python -c "import shutil;shutil.make_archive('paddle_inference', 'zip', root_dir='paddle_inference_install_dir')"
......@@ -702,10 +703,27 @@ for /F %%i in ("%libsize%") do (
)
goto:eof
:zip_file_error
:zip_cc_file_error
echo Tar inference library failed!
exit /b 1
rem ---------------------------------------------------------------------------------------------
:zip_c_file
tree /F %cd%\paddle_inference_c_install_dir\paddle
if exist paddle_inference_c.zip del paddle_inference_c.zip
python -c "import shutil;shutil.make_archive('paddle_inference_c', 'zip', root_dir='paddle_inference_c_install_dir')"
%cache_dir%\tools\busybox64.exe du -h -k paddle_inference_c.zip > lib_size.txt
set /p libsize=< lib_size.txt
for /F %%i in ("%libsize%") do (
set /a libsize_m=%%i/1024
echo "Windows Paddle_Inference CAPI ZIP Size: !libsize_m!M"
)
goto:eof
:zip_c_file_error
echo Tar inference capi library failed!
exit /b 1
:timestamp
setlocal enabledelayedexpansion
@ECHO OFF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册