Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
橘蓝
Paddle
提交
be61c2d0
P
Paddle
项目概览
橘蓝
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
be61c2d0
编写于
2月 24, 2021
作者:
Z
Zhou Wei
提交者:
GitHub
2月 24, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support build whl and inference library nightly,test=windows3 (#30616)
上级
5d6a8c7b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
76 addition
and
20 deletion
+76
-20
paddle/fluid/inference/tests/test.cmake
paddle/fluid/inference/tests/test.cmake
+1
-1
paddle/scripts/paddle_build.bat
paddle/scripts/paddle_build.bat
+75
-19
未找到文件。
paddle/fluid/inference/tests/test.cmake
浏览文件 @
be61c2d0
...
...
@@ -27,7 +27,7 @@ function(inference_download_and_uncompress INSTALL_DIR URL FILENAME)
message
(
STATUS
"Download inference test stuff from
${
URL
}
/
${
FILENAME
}
"
)
string
(
REGEX REPLACE
"[-%./
\\
]"
"_"
FILENAME_EX
${
FILENAME
}
)
string
(
REGEX MATCH
"[^/
\\
]+$"
DOWNLOAD_NAME
${
FILENAME
}
)
set
(
EXTERNAL_PROJECT_NAME
"extern_
inference_
download_
${
FILENAME_EX
}
"
)
set
(
EXTERNAL_PROJECT_NAME
"extern_download_
${
FILENAME_EX
}
"
)
set
(
UNPACK_DIR
"
${
INSTALL_DIR
}
/src/
${
EXTERNAL_PROJECT_NAME
}
"
)
ExternalProject_Add
(
${
EXTERNAL_PROJECT_NAME
}
...
...
paddle/scripts/paddle_build.bat
浏览文件 @
be61c2d0
...
...
@@ -33,21 +33,28 @@ 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
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
if
not
defined
CUDA_ARCH_NAME
set
CUDA_ARCH_NAME
=
Auto
if
not
defined
WITH_GPU
set
WITH_GPU
=
ON
if
not
defined
WITH_MKL
set
WITH_MKL
=
ON
if
not
defined
WITH_AVX
set
WITH_AVX
=
ON
if
not
defined
WITH_TESTING
set
WITH_TESTING
=
ON
if
not
defined
MSVC_STATIC_CRT
set
MSVC_STATIC_CRT
=
OFF
if
not
defined
WITH_PYTHON
set
WITH_PYTHON
=
ON
if
not
defined
ON_INFER
set
ON_INFER
=
ON
if
not
defined
WITH_INFERENCE_API_TEST
set
WITH_INFERENCE_API_TEST
=
ON
if
not
defined
WITH_STATIC_LIB
set
WITH_STATIC_LIB
=
ON
if
not
defined
WITH_CACHE
set
WITH_CACHE
=
OFF
if
not
defined
WITH_TPCACHE
set
WITH_TPCACHE
=
ON
if
not
defined
WITH_CLCACHE
set
WITH_CLCACHE
=
OFF
if
not
defined
WITH_CACHE
set
WITH_CACHE
=
OFF
if
not
defined
WITH_UNITY_BUILD
set
WITH_UNITY_BUILD
=
OFF
if
not
defined
INFERENCE_DEMO_INSTALL_DIR
set
INFERENCE_DEMO_INSTALL_DIR
=
%cache
_dir:\
=
/
%
/inference
_demo
if
not
defined
LOG_LEVEL
set
LOG_LEVEL
=
normal
rem -------set cache build
work
directory-----------
rem -------set cache build directory-----------
rmdir
build
\python
/s/q
rmdir
build
\paddle_install_dir
/s/q
rmdir
build
\paddle_inference_install_dir
/s/q
del
build
\CMakeCache.txt
:
set
CI_SKIP_CPP_TEST
if
only
*
.py
changed
...
...
@@ -149,12 +156,11 @@ echo "wincheck_mkl: run Windows MKL/GPU/UnitTest CI tasks on Windows"
echo
"wincheck_openbals: run Windows OPENBLAS/CPU CI tasks on Windows"
exit
/b
1
rem ------PR CI windows check for MKL/GPU----------
:CASE
_wincheck_mkl
rem ------initialize cmake variable for mkl------
set
WITH_MKL
=
ON
set
WITH_GPU
=
O
FF
set
MSVC_STATIC_CRT
=
O
N
set
WITH_GPU
=
O
N
set
MSVC_STATIC_CRT
=
O
FF
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
...
...
@@ -164,12 +170,11 @@ call :test_inference || goto test_inference_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
goto
:success
rem ------PR CI windows check for OPENBLAS/CPU------
:CASE
_wincheck_openblas
rem ------initialize cmake variable for openblas------
set
WITH_MKL
=
ON
set
WITH_GPU
=
O
N
set
MSVC_STATIC_CRT
=
O
FF
set
WITH_GPU
=
O
FF
set
MSVC_STATIC_CRT
=
O
N
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
...
...
@@ -179,6 +184,38 @@ call :test_inference || goto test_inference_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error
goto
:success
rem ------Build windows avx whl package------
:CASE
_build_avx_whl
set
WITH_AVX
=
ON
set
ON_INFER
=
OFF
set
CUDA_ARCH_NAME
=
All
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
goto
:success
rem ------Build windows no-avx whl package------
:CASE
_build_no_avx_whl
set
WITH_AVX
=
OFF
set
ON_INFER
=
OFF
set
CUDA_ARCH_NAME
=
All
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
call
:test
_whl_pacakage
||
goto
test_whl_pacakage_error
goto
:success
rem ------Build windows inference library------
:CASE
_build_inference_lib
set
WITH_PYTHON
=
OFF
set
CUDA_ARCH_NAME
=
All
call
:cmake
||
goto
cmake_error
call
:build
||
goto
build_error
call
:zip
_file
||
goto
zip_file_error
goto
:success
rem "Other configurations are added here"
rem :CASE_wincheck_others
rem call ...
...
...
@@ -196,7 +233,7 @@ set start=%start:~4,10%
@ECHO
ON
if
not
defined
CUDA_TOOLKIT_ROOT_DIR
set
CUDA_TOOLKIT_ROOT_DIR
=
C
:\Program
Files
\NVIDIA
GPU
Computing
Toolkit
\CUDA\v10.0
set
PATH
=
%CUDA_TOOLKIT_ROOT_DIR%
\bin
;
%CUDA_TOOLKIT_ROOT_DIR%
\libnvvp
;
%PATH%
set
PATH
=
%
TENSORRT
_ROOT:/
=
\
%
\lib
;
%
CUDA_TOOLKIT_ROOT_DIR%
\bin
;
%CUDA_TOOLKIT_ROOT_DIR%
\libnvvp
;
%PATH%
set
CUDA_PATH
=
%CUDA_TOOLKIT_ROOT_DIR%
rem ------set third_party cache dir------
...
...
@@ -239,15 +276,15 @@ echo cmake .. -G %GENERATOR% -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH_GPU% -DWITH_
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-DPYTHON
_EXECUTABLE
=
%PYTHON_EXECUTABLE%
-DON
_INFER
=
%ON_INFER%
^
-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%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
"
%TENSORRT_ROOT%
"
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
-DCUDA
_ARCH_NAME
=
%CUDA_ARCH_NAME%
cmake
..
-G
%GENERATOR%
-DWITH
_AVX
=
%WITH_AVX%
-DWITH
_GPU
=
%WITH_GPU%
-DWITH
_MKL
=
%WITH_MKL%
^
-DWITH
_TESTING
=
%WITH_TESTING%
-DWITH
_PYTHON
=
%WITH_PYTHON%
-DPYTHON
_EXECUTABLE
=
%PYTHON_EXECUTABLE%
-DON
_INFER
=
%ON_INFER%
^
-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%
^
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
%TENSORRT_ROOT%
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
-DWITH
_TENSORRT
=
%WITH_TENSORRT%
-DTENSORRT
_ROOT
=
"
%TENSORRT_ROOT%
"
-DMSVC
_STATIC_CRT
=
%MSVC_STATIC_CRT%
^
-DWITH
_UNITY_BUILD
=
%WITH_UNITY_BUILD%
-DCUDA
_ARCH_NAME
=
%CUDA_ARCH_NAME%
goto
:eof
:cmake
_error
...
...
@@ -286,9 +323,9 @@ rem clcache.exe -z
echo
Build
Paddle
the
%build_times%
time
:
if
"
%WITH_CLCACHE%
"
==
"OFF"
(
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:Configuration
=
Release
/verbosity
:
normal
paddle
.sln
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:Configuration
=
Release
/verbosity
:
%LOG_LEVEL%
paddle
.sln
)
else
(
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:TrackFileAccess
=
false
/p
:CLToolExe
=
clcache
.exe
/p
:CLToolPath
=
%PYTHON_ROOT%
\Scripts
/p
:Configuration
=
Release
/verbosity
:
normal
paddle
.sln
msbuild
/m
:
%PARALLEL_PROJECT_COUNT%
/p
:TrackFileAccess
=
false
/p
:CLToolExe
=
clcache
.exe
/p
:CLToolPath
=
%PYTHON_ROOT%
\Scripts
/p
:Configuration
=
Release
/verbosity
:
%LOG_LEVEL%
paddle
.sln
)
if
%ERRORLEVEL%
NEQ
0
(
...
...
@@ -328,19 +365,21 @@ setlocal enabledelayedexpansion
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
end
=
%%
#
set
end
=
%end
:
~
4
,
10
%
call
:timestamp
"
%start%
"
"
%end%
"
"Build"
tree
/F
%cd%
\paddle_inference_install_dir\paddle
%cache_dir%
\tools\busybox64.exe
du
-h -d
0
-k
%cd%
\paddle_inference_install_dir\paddle\lib
>
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 Size:
!libsize_m!
M"
echo
ipipe_log_param_Windows_Paddle_Inference_Size
:
!libsize_m!
M
)
%cache_dir%
\tools\busybox64.exe
du
-h -d
0
%cd%
\python\dist
>
whl_size
.txt
set
/p
whlsize
=<
whl_size
.txt
for
/F
%%i
in
(
"
%whlsize%
"
)
do
echo
"Windows PR whl Size:
%%i
"
for
/F
%%i
in
(
"
%whlsize%
"
)
do
echo
ipipe_log_param_Windows_PR_whl_Size
:
%%i
dir
/s /b
python
\dist\
*
.whl
>
whl_file
.txt
set
/p
PADDLE_WHL_FILE_WIN
=<
whl_file
.txt
...
...
@@ -551,6 +590,23 @@ goto:eof
:check
_change_of_unittest_error
exit
/b
1
rem ---------------------------------------------------------------------------------------------
:zip
_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')"
%cache_dir%
\tools\busybox64.exe
du
-h -k
paddle_inference
.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 Size:
!libsize_m!
M"
echo
ipipe_log_param_Windows_Paddle_Inference_Size
:
!libsize_m!
M
)
goto
:eof
:zip
_file_error
echo
Tar
inference
library
failed
!
exit
/b
1
:timestamp
setlocal
enabledelayedexpansion
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录