Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
4f304eaa
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看板
提交
4f304eaa
编写于
12月 13, 2018
作者:
Y
Yancey1989
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix unittest test=develop
上级
c722b1dc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
7 deletion
+13
-7
paddle/fluid/framework/parallel_executor.cc
paddle/fluid/framework/parallel_executor.cc
+11
-3
python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py
...dle/fluid/tests/unittests/test_parallel_executor_mnist.py
+2
-0
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py
...uid/tests/unittests/test_parallel_executor_transformer.py
+0
-4
未找到文件。
paddle/fluid/framework/parallel_executor.cc
浏览文件 @
4f304eaa
...
@@ -197,9 +197,17 @@ ParallelExecutor::ParallelExecutor(
...
@@ -197,9 +197,17 @@ ParallelExecutor::ParallelExecutor(
PADDLE_ENFORCE
(
places
.
size
()
>
1
,
PADDLE_ENFORCE
(
places
.
size
()
>
1
,
"If you set build_strategy.reduce with 'Reduce',"
"If you set build_strategy.reduce with 'Reduce',"
"the number of places must be greater than 1."
);
"the number of places must be greater than 1."
);
PADDLE_ENFORCE
(
exec_strategy
.
type_
!=
ExecutionStrategy
::
kParallelGraph
,
}
"You should set build_strategy.reduce with 'AllReduce' for "
"the ParallelGraph executor type"
);
if
(
exec_strategy
.
type_
==
ExecutionStrategy
::
kParallelGraph
)
{
PADDLE_ENFORCE
(
member_
->
use_all_reduce_
,
"build_strategy.reduce should be `AllReduce` if you want to use"
"ParallelGraph executor."
);
PADDLE_ENFORCE
(
member_
->
use_cuda_
,
"execution_strategy.use_cuda should be True if you want to use"
"ParallelGraph executor."
);
}
}
// Step 1. Bcast the params to devs.
// Step 1. Bcast the params to devs.
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py
浏览文件 @
4f304eaa
...
@@ -166,6 +166,8 @@ class TestMNIST(TestParallelExecutorBase):
...
@@ -166,6 +166,8 @@ class TestMNIST(TestParallelExecutorBase):
def
check_batchnorm_fc_convergence
(
self
,
use_cuda
,
exec_type
):
def
check_batchnorm_fc_convergence
(
self
,
use_cuda
,
exec_type
):
if
use_cuda
and
not
core
.
is_compiled_with_cuda
():
if
use_cuda
and
not
core
.
is_compiled_with_cuda
():
return
return
if
not
use_cuda
and
exec_type
==
ExecutorType
.
ParallelGraph
:
return
img
,
label
=
self
.
_init_data
()
img
,
label
=
self
.
_init_data
()
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py
浏览文件 @
4f304eaa
...
@@ -173,10 +173,6 @@ class TestTransformer(TestParallelExecutorBase):
...
@@ -173,10 +173,6 @@ class TestTransformer(TestParallelExecutorBase):
def
test_main
(
self
):
def
test_main
(
self
):
if
core
.
is_compiled_with_cuda
():
if
core
.
is_compiled_with_cuda
():
self
.
check_network_convergence
(
transformer
,
use_cuda
=
True
)
self
.
check_network_convergence
(
transformer
,
use_cuda
=
True
)
self
.
check_network_convergence
(
transformer
,
use_cuda
=
True
,
exec_type
=
ExecutorType
.
ParallelGraph
)
self
.
check_network_convergence
(
self
.
check_network_convergence
(
transformer
,
use_cuda
=
True
,
enable_sequential_execution
=
True
)
transformer
,
use_cuda
=
True
,
enable_sequential_execution
=
True
)
self
.
check_network_convergence
(
transformer
,
use_cuda
=
False
,
iter
=
5
)
self
.
check_network_convergence
(
transformer
,
use_cuda
=
False
,
iter
=
5
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录