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

[cherry-pick] enable remove grad op of linux/win compile scripts (#34295)

* Update paddle_build.bat to remove op grad when build windows inference lib (#33800)

1. check status of remove op grad shell scripts
2. Update paddle_build.bat to remove op grad when build windows inference lib
3. add inference demo test after build finish

* Update paddle_build.sh for remove op grad when compile c++ inference lib (#33798)

* fix zip inference library bug (#34025)
Co-authored-by: zhouweiwei2014's avatarZhou Wei <1183042833@qq.com>
上级 cc4a4639
......@@ -202,9 +202,12 @@ rem ------Build windows inference library------
set ON_INFER=ON
set WITH_PYTHON=OFF
set CUDA_ARCH_NAME=All
python %work_dir%\tools\remove_grad_op_and_kernel.py
if %errorlevel% NEQ 0 exit /b 1
call :cmake || goto cmake_error
call :build || goto build_error
call :test_inference || goto test_inference_error
call :zip_cc_file || goto zip_cc_file_error
call :zip_c_file || goto zip_c_file_error
goto:success
......@@ -678,6 +681,7 @@ exit /b 1
rem ---------------------------------------------------------------------------------------------
:zip_cc_file
cd /d %work_dir%\build
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')"
......@@ -695,6 +699,7 @@ exit /b 1
rem ---------------------------------------------------------------------------------------------
:zip_c_file
cd /d %work_dir%\build
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')"
......
......@@ -1974,6 +1974,7 @@ function main() {
test_fluid_lib
;;
build_inference_lib)
python ${PADDLE_ROOT}/tools/remove_grad_op_and_kernel.py
cmake_gen ${PYTHON_ABI:-""}
gen_fluid_lib ${parallel_number}
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册