1- @ ECHO ON
2- SETLOCAL
3-
41rem Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
52rem
63rem Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,9 +16,13 @@ rem =================================================
1916rem Paddle CI Task On Windows Platform
2017rem =================================================
2118
19+ @ ECHO ON
20+ SETLOCAL
21+
2222rem -------clean up environment-----------
2323set work_dir = %cd%
24- wmic process where name=" op_function_generator.exe" call terminate 2 > NUL
24+ taskkill /f /im op_function_generator.exe
25+ wmic process where name=" op_function_generator.exe" call terminate
2526
2627rem ------initialize common variable------
2728if not defined CUDA_TOOLKIT_ROOT_DIR set CUDA_TOOLKIT_ROOT_DIR = " C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0"
@@ -175,6 +176,7 @@ rem ----------------------------------------------------------------------------
175176echo ========================================
176177echo Step 1. Cmake ...
177178echo ========================================
179+ call " C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
178180
179181for /F %% # in ('wmic os get localdatetime^ |findstr 20') do set start = %% #
180182set start = %start:~4 ,10 %
@@ -201,9 +203,8 @@ rem ----------------------------------------------------------------------------
201203echo ========================================
202204echo Step 2. Buile Paddle ...
203205echo ========================================
204- call " C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
205206
206- for /F %% # in ('wmic cpu get NumberOfLogicalProcessors^ |findstr [0-9]') do set /a PARALLEL_PROJECT_COUNT = %% #* 8 / 10
207+ for /F %% # in ('wmic cpu get NumberOfLogicalProcessors^ |findstr [0-9]') do set /a PARALLEL_PROJECT_COUNT = %% #* 9 / 10
207208set build_times = 1
208209:build_tp
209210echo Build third_party the %build_times% time:
@@ -248,13 +249,18 @@ echo ========================================
248249echo Step 3. Test pip install whl package ...
249250echo ========================================
250251
252+ setlocal enabledelayedexpansion
253+
251254for /F %% # in ('wmic os get localdatetime^ |findstr 20') do set end = %% #
252255set end = %end:~4 ,10 %
253256call :timestamp " %start% " " %end% " " Build"
254257tree /F %cd% \paddle_inference_install_dir\paddle
255- %cache_dir% \tools\busybox64.exe du -h -d 0 %cd% \paddle_inference_install_dir\paddle\lib > lib_size.txt
258+ %cache_dir% \tools\busybox64.exe du -h -d 0 -k %cd% \paddle_inference_install_dir\paddle\lib > lib_size.txt
256259set /p libsize = < lib_size.txt
257- for /F %%i in (" %libsize% " ) do echo " Windows Paddle_Inference Size: %%i "
260+ for /F %%i in (" %libsize% " ) do (
261+ set /a libsize_m = %%i / 1024
262+ echo " Windows Paddle_Inference Size: !libsize_m! M"
263+ )
258264%cache_dir% \tools\busybox64.exe du -h -d 0 %cd% \python\dist > whl_size.txt
259265set /p whlsize = < whl_size.txt
260266for /F %%i in (" %whlsize% " ) do echo " Windows PR whl Size: %%i "
0 commit comments