Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
0fe16539
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,发现更多精彩内容 >>
提交
0fe16539
编写于
12月 17, 2019
作者:
W
WangXi
提交者:
gongweibao
12月 17, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix dgc & launch tests in cpu ci (#21759)
上级
94d72752
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
12 deletion
+25
-12
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+11
-2
python/paddle/fluid/tests/unittests/test_dist_mnist_dgc_nccl.py
.../paddle/fluid/tests/unittests/test_dist_mnist_dgc_nccl.py
+14
-10
未找到文件。
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
0fe16539
...
...
@@ -257,14 +257,23 @@ if(WITH_DISTRIBUTE)
py_test_modules
(
test_recv_save_op MODULES test_recv_save_op ENVS
${
dist_ENVS
}
)
py_test_modules
(
test_transpiler_ops MODULES test_transpiler_ops ENVS
${
dist_ENVS
}
)
if
(
WITH_DGC
)
# if with dgc, test all dgc tests.
# NOTE. dist dgc tests is already in DIST_TEST_OPS
py_test_modules
(
test_dgc_op MODULES test_dgc_op
)
py_test_modules
(
test_dgc_momentum_op MODULES test_dgc_momentum_op
)
py_test_modules
(
test_dgc_optimizer MODULES test_dgc_optimizer
)
else
()
# if not with dgc, must close all dgc tests
list
(
REMOVE_ITEM DIST_TEST_OPS
"test_dist_mnist_dgc_nccl"
)
list
(
REMOVE_ITEM DIST_TEST_OPS
"test_dist_se_resnext_dgc"
)
endif
()
if
(
NOT APPLE
)
bash_test_modules
(
test_listen_and_serv_op MODULES test_listen_and_serv.sh
)
bash_test_modules
(
test_launch MODULES test_launch.sh
)
bash_test_modules
(
test_launch_ps MODULES test_launch_ps.sh
)
if
(
WITH_GPU
)
# NOTE. test_launch only work in gpu collective mode
bash_test_modules
(
test_launch MODULES test_launch.sh
)
endif
()
bash_test_modules
(
test_launch_ps MODULES test_launch_ps.sh
)
set
(
dist_ut_port 1000
)
foreach
(
TEST_OP
${
DIST_TEST_OPS
}
)
...
...
python/paddle/fluid/tests/unittests/test_dist_mnist_dgc_nccl.py
浏览文件 @
0fe16539
...
...
@@ -49,13 +49,15 @@ class TestDistMnistNCCL2DGC(TestDistBase):
log_name
=
flag_name
)
def
tearDown
(
self
):
result
=
count_of_sparse_all_reduce_calls
(
'test_dist_mnist_dgc_nccl_tr0_err.log'
)
# only 1 layer use dgc now, run_step=5, rampup_begin_step=2, so 1 * (5 - 2) = 3
import
paddle.fluid
as
fluid
if
fluid
.
core
.
is_compiled_with_cuda
():
result
=
count_of_sparse_all_reduce_calls
(
'test_dist_mnist_dgc_nccl_tr0_err.log'
)
# only 1 layer use dgc now, run_step=5, rampup_begin_step=2, so 1 * (5 - 2) = 3
# temp close this test. In python3 CI, the log is right, but the result
# has a problem, may be in multi process mode, log is not writed in time.
# self.assertEqual(result, 3)
# temp close this test. In python3 CI, the log is right, but the result
# has a problem, may be in multi process mode, log is not writed in time.
# self.assertEqual(result, 3)
class
TestDistMnistNCCL2DGCMultiCards
(
TestDistBase
):
...
...
@@ -76,10 +78,12 @@ class TestDistMnistNCCL2DGCMultiCards(TestDistBase):
log_name
=
flag_name
)
def
tearDown
(
self
):
result
=
count_of_sparse_all_reduce_calls
(
'test_dist_mnist_dgc_nccl_dgc_2cards_local.log'
)
# same as above, but use two cards
self
.
assertEqual
(
result
,
6
)
import
paddle.fluid
as
fluid
if
fluid
.
core
.
is_compiled_with_cuda
():
result
=
count_of_sparse_all_reduce_calls
(
'test_dist_mnist_dgc_nccl_dgc_2cards_local.log'
)
# same as above, but use two cards
self
.
assertEqual
(
result
,
6
)
if
__name__
==
"__main__"
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录