Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
9674e440
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9674e440
编写于
1月 20, 2021
作者:
Z
Zhou Wei
提交者:
GitHub
1月 20, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
optimize windows CI, clear tp cache,polish code,improve level of msvc log (#30579)
上级
90773473
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
35 addition
and
35 deletion
+35
-35
paddle/scripts/paddle_build.bat
paddle/scripts/paddle_build.bat
+35
-35
未找到文件。
paddle/scripts/paddle_build.bat
浏览文件 @
9674e440
...
@@ -30,6 +30,7 @@ taskkill /f /im op_function_generator.exe
...
@@ -30,6 +30,7 @@ taskkill /f /im op_function_generator.exe
wmic
process
where
name
=
"op_function_generator.exe"
call
terminate
wmic
process
where
name
=
"op_function_generator.exe"
call
terminate
rem ------initialize common variable------
rem ------initialize common variable------
if
not
defined
GENERATOR
set
GENERATOR
=
"Visual Studio 14 2015 Win64"
if
not
defined
BRANCH
set
BRANCH
=
develop
if
not
defined
BRANCH
set
BRANCH
=
develop
if
not
defined
WITH_TENSORRT
set
WITH_TENSORRT
=
ON
if
not
defined
WITH_TENSORRT
set
WITH_TENSORRT
=
ON
if
not
defined
TENSORRT_ROOT
set
TENSORRT_ROOT
=
"D:/TensorRT"
if
not
defined
TENSORRT_ROOT
set
TENSORRT_ROOT
=
"D:/TensorRT"
...
@@ -43,11 +44,15 @@ if not defined WITH_STATIC_LIB set WITH_STATIC_LIB=ON
...
@@ -43,11 +44,15 @@ if not defined WITH_STATIC_LIB set WITH_STATIC_LIB=ON
if
not
defined
WITH_CACHE
set
WITH_CACHE
=
OFF
if
not
defined
WITH_CACHE
set
WITH_CACHE
=
OFF
if
not
defined
WITH_TPCACHE
set
WITH_TPCACHE
=
ON
if
not
defined
WITH_TPCACHE
set
WITH_TPCACHE
=
ON
if
not
defined
WITH_UNITY_BUILD
set
WITH_UNITY_BUILD
=
OFF
if
not
defined
WITH_UNITY_BUILD
set
WITH_UNITY_BUILD
=
OFF
set
INFERENCE_DEMO_INSTALL_DIR
=
%cache
_dir:\
=
/
%
/inference
_demo
if
not
defined
INFERENCE_DEMO_INSTALL_DIR
set
INFERENCE_DEMO_INSTALL_DIR
=
%cache
_dir:\
=
/
%
/inference
_demo
rem -------set cache build work directory-----------
rem -------set cache build work directory-----------
rmdir
build
\python
/s/q
rmdir
build
\python
/s/q
del
build
\CMakeCache.txt
del
build
\CMakeCache.txt
:
set
CI_SKIP_CPP_TEST
if
only
*
.py
changed
git
diff
--name-only
%BRANCH%
|
findstr
/V
"\.py"
||
set
CI_SKIP_CPP_TEST
=
ON
if
"
%WITH_CACHE%
"
==
"OFF"
(
if
"
%WITH_CACHE%
"
==
"OFF"
(
rmdir
build
/s/q
rmdir
build
/s/q
goto
:mkbuild
goto
:mkbuild
...
@@ -66,9 +71,6 @@ git show-ref --verify --quiet refs/heads/last_pr
...
@@ -66,9 +71,6 @@ git show-ref --verify --quiet refs/heads/last_pr
if
%ERRORLEVEL%
EQU
0
(
if
%ERRORLEVEL%
EQU
0
(
git
diff
HEAD
last_pr
--stat --name-only
git
diff
HEAD
last_pr
--stat --name-only
git
diff
HEAD
last_pr
--stat --name-only
|
findstr
"cmake/[a-zA-Z]*\.cmake CMakeLists.txt"
git
diff
HEAD
last_pr
--stat --name-only
|
findstr
"cmake/[a-zA-Z]*\.cmake CMakeLists.txt"
if
!ERRORLEVEL!
EQU
0
(
rmdir
build
/s/q
)
git
branch
-D
last_pr
git
branch
-D
last_pr
git
branch
last_pr
git
branch
last_pr
)
else
(
)
else
(
...
@@ -76,20 +78,6 @@ if %ERRORLEVEL% EQU 0 (
...
@@ -76,20 +78,6 @@ if %ERRORLEVEL% EQU 0 (
git
branch
last_pr
git
branch
last_pr
)
)
:: set CI_SKIP_CPP_TEST if only *.py changed
git
diff
--name-only
%BRANCH%
|
findstr
/V
"\.py"
||
set
CI_SKIP_CPP_TEST
=
ON
:: for /F %%# in ('wmic os get localdatetime^|findstr 20') do set datetime=%%#
:: set day_now=%datetime:~6,2%
:: set day_before=-1
:: set /p day_before=< %cache_dir%\day.txt
:: if %day_now% NEQ %day_before% (
:: echo %day_now% > %cache_dir%\day.txt
:: type %cache_dir%\day.txt
:: rmdir build /s/q
:: goto :mkbuild
:: )
:: git diff HEAD origin/develop --stat --name-only
:: git diff HEAD origin/develop --stat --name-only
:: git diff HEAD origin/develop --stat --name-only | findstr ".cmake CMakeLists.txt paddle_build.bat"
:: git diff HEAD origin/develop --stat --name-only | findstr ".cmake CMakeLists.txt paddle_build.bat"
:: if %ERRORLEVEL% EQU 0 (
:: if %ERRORLEVEL% EQU 0 (
...
@@ -113,11 +101,11 @@ dir paddle\fluid\pybind\Release
...
@@ -113,11 +101,11 @@ dir paddle\fluid\pybind\Release
rem ------initialize the python environment------
rem ------initialize the python environment------
if
not
defined
PYTHON_ROOT
set
PYTHON_ROOT
=
C
:\Python37
if
not
defined
PYTHON_ROOT
set
PYTHON_ROOT
=
C
:\Python37
set
PYTHON_EXECUTABLE
=
%PYTHON_ROOT%
\python.exe
set
PATH
=
%PYTHON_ROOT%
;
%PYTHON_ROOT%
\Scripts
;
%PATH%
set
PATH
=
%PYTHON_ROOT%
;
%PYTHON_ROOT%
\Scripts
;
%PATH%
rem ToDo: virtual environment can't be deleted safely, some process not exit when task is canceled
rem ToDo: virtual environment can't be deleted safely, some process not exit when task is canceled
rem Now use system python environment temporarily
rem Now use system python environment temporarily
rem set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
rem %PYTHON_EXECUTABLE% -m pip install virtualenv
rem %PYTHON_EXECUTABLE% -m pip install virtualenv
rem %PYTHON_EXECUTABLE% -m virtualenv paddle_winci
rem %PYTHON_EXECUTABLE% -m virtualenv paddle_winci
rem call paddle_winci\Scripts\activate.bat
rem call paddle_winci\Scripts\activate.bat
...
@@ -166,12 +154,11 @@ rem ------initialize cmake variable for mkl------
...
@@ -166,12 +154,11 @@ rem ------initialize cmake variable for mkl------
set
WITH_MKL
=
ON
set
WITH_MKL
=
ON
set
WITH_GPU
=
OFF
set
WITH_GPU
=
OFF
set
MSVC_STATIC_CRT
=
ON
set
MSVC_STATIC_CRT
=
ON
set
WITH_CLCACHE
=
OFF
call
:cmake
||
goto
cmake_error
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
call
:build
||
goto
build_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
call
:
unit
_test
||
goto
unit_tes
t_error
call
:
test
_unit
||
goto
test_uni
t_error
call
:test
_inference
||
goto
test_inference_error
call
:test
_inference
||
goto
test_inference_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
goto
:success
goto
:success
...
@@ -182,13 +169,11 @@ rem ------initialize cmake variable for openblas------
...
@@ -182,13 +169,11 @@ rem ------initialize cmake variable for openblas------
set
WITH_MKL
=
ON
set
WITH_MKL
=
ON
set
WITH_GPU
=
ON
set
WITH_GPU
=
ON
set
MSVC_STATIC_CRT
=
OFF
set
MSVC_STATIC_CRT
=
OFF
rem Temporarily turn off WITH_INFERENCE_API_TEST on GPU due to compile hang
set
WITH_INFERENCE_API_TEST
=
OFF
call
:cmake
||
goto
cmake_error
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
call
:build
||
goto
build_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
call
:
unit
_test
||
goto
unit_tes
t_error
call
:
test
_unit
||
goto
test_uni
t_error
call
:test
_inference
||
goto
test_inference_error
call
:test
_inference
||
goto
test_inference_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
goto
:success
goto
:success
...
@@ -215,6 +200,20 @@ set CUDA_PATH=%CUDA_TOOLKIT_ROOT_DIR%
...
@@ -215,6 +200,20 @@ set CUDA_PATH=%CUDA_TOOLKIT_ROOT_DIR%
rem ------set third_party cache dir------
rem ------set third_party cache dir------
:
clear
third
party
cache
every
once
in
a
while
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
datetime
=
%%
#
set
day_now
=
%datetime
:
~
6
,
2
%
set
day_before
=-
1
set
/p
day_before
=<
%cache_dir%
\day.txt
if
%day_now%
NEQ
%day_before%
(
echo
%day_now%
>
%cache_dir%
\day.txt
type
%cache_dir%
\day.txt
if
%day_now%
EQU
20
(
rmdir
%cache_dir%
\third_party_GPU/
/s/q
rmdir
%cache_dir%
\third_party/
/s/q
)
)
if
"
%WITH_TPCACHE%
"
==
"OFF"
(
if
"
%WITH_TPCACHE%
"
==
"OFF"
(
set
THIRD_PARTY_PATH
=
%work
_dir:\
=
/
%
/build/third
_party
set
THIRD_PARTY_PATH
=
%work
_dir:\
=
/
%
/build/third
_party
goto
:cmake
_impl
goto
:cmake
_impl
...
@@ -235,15 +234,15 @@ if "%WITH_GPU%"=="ON" (
...
@@ -235,15 +234,15 @@ if "%WITH_GPU%"=="ON" (
)
)
:cmake
_impl
:cmake
_impl
echo
cmake
..
-G
"Visual Studio 14 2015 Win64"
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
echo
cmake
..
-G
%GENERATOR%
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-DON
_INFER
=
%ON_INFER%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-D
PYTHON
_EXECUTABLE
=
%PYTHON_EXECUTABLE%
-D
ON
_INFER
=
%ON_INFER%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
cmake
..
-G
"Visual Studio 14 2015 Win64"
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
cmake
..
-G
%GENERATOR%
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-DON
_INFER
=
%ON_INFER%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-D
PYTHON
_EXECUTABLE
=
%PYTHON_EXECUTABLE%
-D
ON
_INFER
=
%ON_INFER%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
...
@@ -286,9 +285,9 @@ clcache.exe -z
...
@@ -286,9 +285,9 @@ clcache.exe -z
echo
Build
Paddle
the
%build_times%
time
:
echo
Build
Paddle
the
%build_times%
time
:
if
"
%WITH_CLCACHE%
"
==
"OFF"
(
if
"
%WITH_CLCACHE%
"
==
"OFF"
(
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:Configuration
=
Release
/verbosity
:
mini
mal
paddle
.sln
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:Configuration
=
Release
/verbosity
:
nor
mal
paddle
.sln
)
else
(
)
else
(
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:TrackFileAccess
=
false
/p
:CLToolExe
=
clcache
.exe
/p
:CLToolPath
=
%PYTHON_ROOT%
\Scripts
/p
:Configuration
=
Release
/verbosity
:
mini
mal
paddle
.sln
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:TrackFileAccess
=
false
/p
:CLToolExe
=
clcache
.exe
/p
:CLToolPath
=
%PYTHON_ROOT%
\Scripts
/p
:Configuration
=
Release
/verbosity
:
nor
mal
paddle
.sln
)
)
if
%ERRORLEVEL%
NEQ
0
(
if
%ERRORLEVEL%
NEQ
0
(
...
@@ -365,7 +364,7 @@ echo Test import paddle failed, will exit!
...
@@ -365,7 +364,7 @@ echo Test import paddle failed, will exit!
exit
/b
1
exit
/b
1
rem ---------------------------------------------------------------------------------------------
rem ---------------------------------------------------------------------------------------------
:
unit
_tes
t
:
test
_uni
t
@ECHO
ON
@ECHO
ON
echo
========================================
echo
========================================
echo
Step
4
.
Running
unit
tests
...
echo
Step
4
.
Running
unit
tests
...
...
@@ -435,7 +434,7 @@ ctest.exe -E "(%disable_ut_quickly%)" -LE %nightly_label% --output-on-failure -C
...
@@ -435,7 +434,7 @@ ctest.exe -E "(%disable_ut_quickly%)" -LE %nightly_label% --output-on-failure -C
goto
:eof
goto
:eof
:
unit
_tes
t_error
:
test
_uni
t_error
:: echo 8 > %cache_dir%\error_code.txt
:: echo 8 > %cache_dir%\error_code.txt
:: type %cache_dir%\error_code.txt
:: type %cache_dir%\error_code.txt
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
end
=
%%
#
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
end
=
%%
#
...
@@ -508,11 +507,12 @@ echo git fetch upstream $BRANCH # develop is not fetched>> check_change_of_
...
@@ -508,11 +507,12 @@ echo git fetch upstream $BRANCH # develop is not fetched>> check_change_of_
echo
fi
>>
check_change_of_unittest
.sh
echo
fi
>>
check_change_of_unittest
.sh
echo
git
checkout
-b
origin_pr
>>
check_change_of_unittest
.sh
echo
git
checkout
-b
origin_pr
>>
check_change_of_unittest
.sh
echo
git
checkout
-f
$BRANCH
>>
check_change_of_unittest
.sh
echo
git
checkout
-f
$BRANCH
>>
check_change_of_unittest
.sh
echo
cmake
..
-G
"Visual Studio 14 2015 Win64"
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
echo
cmake
..
-G
%GENERATOR%
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-DON
_INFER
=
%ON_INFER%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-D
PYTHON
_EXECUTABLE
=
%PYTHON_EXECUTABLE%
-D
ON
_INFER
=
%ON_INFER%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DWITH
_INFERENCE_API_TEST
=
%WITH_INFERENCE_API_TEST%
-DTHIRD
_PARTY_PATH
=
%THIRD_PARTY_PATH%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DINFERENCE
_DEMO_INSTALL_DIR
=
%INFERENCE_DEMO_INSTALL_DIR%
-DWITH
_STATIC_LIB
=
%WITH_STATIC_LIB%
^
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
>>
check_change_of_unittest
.sh
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
>>
check_change_of_unittest
.sh
echo
cat
^<^<
EOF
>>
check_change_of_unittest
.sh
echo
cat
^<^<
EOF
>>
check_change_of_unittest
.sh
echo
============================================
>>
check_change_of_unittest
.sh
echo
============================================
>>
check_change_of_unittest
.sh
echo
Generate
unit
tests
.spec
of
develop
.
>>
check_change_of_unittest
.sh
echo
Generate
unit
tests
.spec
of
develop
.
>>
check_change_of_unittest
.sh
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录