Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
162f2d41
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看板
提交
162f2d41
编写于
11月 16, 2018
作者:
P
peizhilin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
disable the openblas multi-thread on windows since no support
adjust the python script
上级
d1429ac4
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
258 addition
and
260 deletion
+258
-260
paddle/fluid/platform/cpu_helper.cc
paddle/fluid/platform/cpu_helper.cc
+6
-0
paddle/fluid/platform/init.cc
paddle/fluid/platform/init.cc
+0
-7
python/paddle/fluid/__init__.py
python/paddle/fluid/__init__.py
+2
-1
python/paddle/fluid/contrib/inferencer.py
python/paddle/fluid/contrib/inferencer.py
+1
-3
python/paddle/fluid/contrib/trainer.py
python/paddle/fluid/contrib/trainer.py
+1
-2
python/paddle/fluid/parallel_executor.py
python/paddle/fluid/parallel_executor.py
+248
-247
未找到文件。
paddle/fluid/platform/cpu_helper.cc
浏览文件 @
162f2d41
...
@@ -29,6 +29,12 @@ namespace platform {
...
@@ -29,6 +29,12 @@ namespace platform {
void
SetNumThreads
(
int
num_threads
)
{
void
SetNumThreads
(
int
num_threads
)
{
#ifdef PADDLE_USE_OPENBLAS
#ifdef PADDLE_USE_OPENBLAS
// windows has no support for openblas multi-thread
#ifdef _WIN32
if
(
num_threads
>
1
)
{
num_threads
=
1
;
}
#endif
int
real_num_threads
=
num_threads
>
1
?
num_threads
:
1
;
int
real_num_threads
=
num_threads
>
1
?
num_threads
:
1
;
openblas_set_num_threads
(
real_num_threads
);
openblas_set_num_threads
(
real_num_threads
);
#elif defined(PADDLE_WITH_MKLML)
#elif defined(PADDLE_WITH_MKLML)
...
...
paddle/fluid/platform/init.cc
浏览文件 @
162f2d41
...
@@ -113,13 +113,6 @@ void InitDevices(bool init_p2p, const std::vector<int> devices) {
...
@@ -113,13 +113,6 @@ void InitDevices(bool init_p2p, const std::vector<int> devices) {
places
.
emplace_back
(
platform
::
CPUPlace
());
places
.
emplace_back
(
platform
::
CPUPlace
());
platform
::
DeviceContextPool
::
Init
(
places
);
platform
::
DeviceContextPool
::
Init
(
places
);
// windows has no support for openblas multi-thread
#ifdef _WIN32
if
(
FLAGS_paddle_num_threads
>
1
)
{
FLAGS_paddle_num_threads
=
1
;
}
#endif
#ifndef PADDLE_WITH_MKLDNN
#ifndef PADDLE_WITH_MKLDNN
platform
::
SetNumThreads
(
FLAGS_paddle_num_threads
);
platform
::
SetNumThreads
(
FLAGS_paddle_num_threads
);
#endif
#endif
...
...
python/paddle/fluid/__init__.py
浏览文件 @
162f2d41
...
@@ -47,7 +47,8 @@ from . import profiler
...
@@ -47,7 +47,8 @@ from . import profiler
from
.
import
unique_name
from
.
import
unique_name
from
.
import
recordio_writer
from
.
import
recordio_writer
from
.
import
parallel_executor
from
.
import
parallel_executor
from
.parallel_executor
import
*
if
os
.
name
!=
'nt'
:
from
.parallel_executor
import
*
from
paddle.fluid.layers.math_op_patch
import
monkey_patch_variable
from
paddle.fluid.layers.math_op_patch
import
monkey_patch_variable
Tensor
=
LoDTensor
Tensor
=
LoDTensor
...
...
python/paddle/fluid/contrib/inferencer.py
浏览文件 @
162f2d41
...
@@ -15,15 +15,13 @@
...
@@ -15,15 +15,13 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
contextlib
import
contextlib
import
os
from
..
import
core
from
..
import
core
from
..
import
executor
from
..
import
executor
from
..
import
framework
from
..
import
framework
from
..
import
io
from
..
import
io
if
os
.
name
!=
'nt'
:
from
..
import
parallel_executor
from
..
import
parallel_executor
from
..
import
unique_name
from
..
import
unique_name
from
.trainer
import
check_and_get_place
from
.trainer
import
check_and_get_place
...
...
python/paddle/fluid/contrib/trainer.py
浏览文件 @
162f2d41
...
@@ -28,8 +28,7 @@ from .. import framework
...
@@ -28,8 +28,7 @@ from .. import framework
from
..
import
io
from
..
import
io
# optimizer is same as the parameter of Trainer.__init__. Rename it to opt_module
# optimizer is same as the parameter of Trainer.__init__. Rename it to opt_module
from
..
import
optimizer
as
opt_module
from
..
import
optimizer
as
opt_module
if
os
.
name
!=
'nt'
:
from
..
import
parallel_executor
from
..
import
parallel_executor
from
..transpiler
import
distribute_transpiler
from
..transpiler
import
distribute_transpiler
__all__
=
[
__all__
=
[
...
...
python/paddle/fluid/parallel_executor.py
浏览文件 @
162f2d41
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录