1
- @ ECHO ON
2
- SETLOCAL
3
-
4
1
rem Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
5
2
rem
6
3
rem Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,9 +16,13 @@ rem =================================================
19
16
rem Paddle CI Task On Windows Platform
20
17
rem =================================================
21
18
19
+ @ ECHO ON
20
+ SETLOCAL
21
+
22
22
rem -------clean up environment-----------
23
23
set 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
25
26
26
27
rem ------initialize common variable------
27
28
if 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 ----------------------------------------------------------------------------
175
176
echo ========================================
176
177
echo Step 1. Cmake ...
177
178
echo ========================================
179
+ call " C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
178
180
179
181
for /F %% # in ('wmic os get localdatetime^ |findstr 20') do set start = %% #
180
182
set start = %start:~4 ,10 %
@@ -201,9 +203,8 @@ rem ----------------------------------------------------------------------------
201
203
echo ========================================
202
204
echo Step 2. Buile Paddle ...
203
205
echo ========================================
204
- call " C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
205
206
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
207
208
set build_times = 1
208
209
:build_tp
209
210
echo Build third_party the %build_times% time:
@@ -248,19 +249,25 @@ echo ========================================
248
249
echo Step 3. Test pip install whl package ...
249
250
echo ========================================
250
251
252
+ setlocal enabledelayedexpansion
253
+
251
254
for /F %% # in ('wmic os get localdatetime^ |findstr 20') do set end = %% #
252
255
set end = %end:~4 ,10 %
253
256
call :timestamp " %start% " " %end% " " Build"
257
+ @ ECHO OFF
254
258
tree /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
259
+ %cache_dir% \tools\busybox64.exe du -h -d 0 -k %cd% \paddle_inference_install_dir\paddle\lib > lib_size.txt
256
260
set /p libsize = < lib_size.txt
257
- for /F %%i in (" %libsize% " ) do echo " Windows Paddle_Inference Size: %%i "
261
+ for /F %%i in (" %libsize% " ) do (
262
+ set /a libsize_m = %%i / 1024
263
+ echo " Windows Paddle_Inference Size: !libsize_m! M"
264
+ )
258
265
%cache_dir% \tools\busybox64.exe du -h -d 0 %cd% \python\dist > whl_size.txt
259
266
set /p whlsize = < whl_size.txt
260
267
for /F %%i in (" %whlsize% " ) do echo " Windows PR whl Size: %%i "
261
268
dir /s /b python\dist\*.whl > whl_file.txt
262
269
set /p PADDLE_WHL_FILE_WIN = < whl_file.txt
263
-
270
+ @ ECHO ON
264
271
pip uninstall -y paddlepaddle
265
272
pip uninstall -y paddlepaddle-gpu
266
273
pip install -U %PADDLE_WHL_FILE_WIN% --user
0 commit comments