Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
4ccc1716
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4ccc1716
编写于
10月 22, 2020
作者:
Z
Zhou Wei
提交者:
GitHub
10月 22, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix Automatic GPU detection failed on windows (#28148) (#28182)
上级
51b7bbee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
13 deletion
+16
-13
cmake/cuda.cmake
cmake/cuda.cmake
+0
-4
paddle/scripts/paddle_build.bat
paddle/scripts/paddle_build.bat
+16
-9
未找到文件。
cmake/cuda.cmake
浏览文件 @
4ccc1716
...
@@ -62,10 +62,6 @@ function(detect_installed_gpus out_variable)
...
@@ -62,10 +62,6 @@ function(detect_installed_gpus out_variable)
if
(
NOT CUDA_gpu_detect_output
)
if
(
NOT CUDA_gpu_detect_output
)
message
(
STATUS
"Automatic GPU detection failed. Building for all known architectures."
)
message
(
STATUS
"Automatic GPU detection failed. Building for all known architectures."
)
set
(
${
out_variable
}
${
paddle_known_gpu_archs
}
PARENT_SCOPE
)
set
(
${
out_variable
}
${
paddle_known_gpu_archs
}
PARENT_SCOPE
)
#Todo: fix Automatic GPU detection failed on windows
if
(
WIN32
)
set
(
${
out_variable
}
"61 75"
PARENT_SCOPE
)
endif
()
else
()
else
()
set
(
${
out_variable
}
${
CUDA_gpu_detect_output
}
PARENT_SCOPE
)
set
(
${
out_variable
}
${
CUDA_gpu_detect_output
}
PARENT_SCOPE
)
endif
()
endif
()
...
...
paddle/scripts/paddle_build.bat
浏览文件 @
4ccc1716
@ECHO
ON
SETLOCAL
rem Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
rem Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
rem
rem
rem Licensed under the Apache License, Version 2.0 (the "License");
rem Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -19,9 +16,13 @@ rem =================================================
...
@@ -19,9 +16,13 @@ rem =================================================
rem Paddle CI Task On Windows Platform
rem Paddle CI Task On Windows Platform
rem =================================================
rem =================================================
@ECHO
ON
SETLOCAL
rem -------clean up environment-----------
rem -------clean up environment-----------
set
work_dir
=
%cd%
set
work_dir
=
%cd%
wmic
process
where
name
=
"op_function_generator.exe"
call
terminate
2
>
NUL
taskkill
/f /im
op_function_generator
.exe
wmic
process
where
name
=
"op_function_generator.exe"
call
terminate
rem ------initialize common variable------
rem ------initialize common variable------
if
not
defined
CUDA_TOOLKIT_ROOT_DIR
set
CUDA_TOOLKIT_ROOT_DIR
=
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0"
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,6 +176,7 @@ rem ----------------------------------------------------------------------------
echo
========================================
echo
========================================
echo
Step
1
.
Cmake
...
echo
Step
1
.
Cmake
...
echo
========================================
echo
========================================
call
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
amd64
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
start
=
%%
#
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
start
=
%%
#
set
start
=
%start
:
~
4
,
10
%
set
start
=
%start
:
~
4
,
10
%
...
@@ -201,9 +203,8 @@ rem ----------------------------------------------------------------------------
...
@@ -201,9 +203,8 @@ rem ----------------------------------------------------------------------------
echo
========================================
echo
========================================
echo
Step
2
.
Buile
Paddle
...
echo
Step
2
.
Buile
Paddle
...
echo
========================================
echo
========================================
call
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
amd64
for
/F
%%
#
in
(
'wmic cpu get NumberOfLogicalProcessors
^|
findstr [0-9]'
)
do
set
/a
PARALLEL_PROJECT_COUNT
=
%%
#
*
8
/10
for
/F
%%
#
in
(
'wmic cpu get NumberOfLogicalProcessors
^|
findstr [0-9]'
)
do
set
/a
PARALLEL_PROJECT_COUNT
=
%%
#
*
9
/10
set
build_times
=
1
set
build_times
=
1
:build
_tp
:build
_tp
echo
Build
third_party
the
%build_times%
time
:
echo
Build
third_party
the
%build_times%
time
:
...
@@ -248,19 +249,25 @@ echo ========================================
...
@@ -248,19 +249,25 @@ echo ========================================
echo
Step
3
.
Test
pip
install
whl
package
...
echo
Step
3
.
Test
pip
install
whl
package
...
echo
========================================
echo
========================================
setlocal
enabledelayedexpansion
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
end
=
%%
#
for
/F
%%
#
in
(
'wmic os get localdatetime
^|
findstr 20'
)
do
set
end
=
%%
#
set
end
=
%end
:
~
4
,
10
%
set
end
=
%end
:
~
4
,
10
%
call
:timestamp
"
%start%
"
"
%end%
"
"Build"
call
:timestamp
"
%start%
"
"
%end%
"
"Build"
@ECHO
OFF
tree
/F
%cd%
\paddle_inference_install_dir\paddle
tree
/F
%cd%
\paddle_inference_install_dir\paddle
%cache_dir%
\tools\busybox64.exe
du
-h -d
0
%cd%
\paddle_inference_install_dir\paddle\lib
>
lib_size
.txt
%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
set
/p
libsize
=<
lib_size
.txt
for
/F
%%i
in
(
"
%libsize%
"
)
do
echo
"Windows Paddle_Inference Size:
%%i
"
for
/F
%%i
in
(
"
%libsize%
"
)
do
(
set
/a
libsize_m
=
%%i
/1024
echo
"Windows Paddle_Inference Size:
!libsize_m!
M"
)
%cache_dir%
\tools\busybox64.exe
du
-h -d
0
%cd%
\python\dist
>
whl_size
.txt
%cache_dir%
\tools\busybox64.exe
du
-h -d
0
%cd%
\python\dist
>
whl_size
.txt
set
/p
whlsize
=<
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
"Windows PR whl Size:
%%i
"
dir
/s /b
python
\dist\
*
.whl
>
whl_file
.txt
dir
/s /b
python
\dist\
*
.whl
>
whl_file
.txt
set
/p
PADDLE_WHL_FILE_WIN
=<
whl_file
.txt
set
/p
PADDLE_WHL_FILE_WIN
=<
whl_file
.txt
@ECHO
ON
pip
uninstall
-y
paddlepaddle
pip
uninstall
-y
paddlepaddle
pip
uninstall
-y
paddlepaddle
-gpu
pip
uninstall
-y
paddlepaddle
-gpu
pip
install
-U
%PADDLE_WHL_FILE_WIN%
--user
pip
install
-U
%PADDLE_WHL_FILE_WIN%
--user
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录