Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
c00303ec
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看板
未验证
提交
c00303ec
编写于
1月 24, 2022
作者:
S
sneaxiy
提交者:
GitHub
1月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test allreduce tests (#39166)
上级
7874d0a5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
paddle/fluid/framework/ir/graph_helper.cc
paddle/fluid/framework/ir/graph_helper.cc
+4
-4
python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt
...e/fluid/tests/unittests/distributed_passes/CMakeLists.txt
+1
-1
未找到文件。
paddle/fluid/framework/ir/graph_helper.cc
浏览文件 @
c00303ec
...
@@ -603,9 +603,9 @@ static std::vector<std::vector<ir::Node::Dep>> GetOpDependencies(
...
@@ -603,9 +603,9 @@ static std::vector<std::vector<ir::Node::Dep>> GetOpDependencies(
for
(
const
auto
*
op_desc
:
block_ops
)
{
for
(
const
auto
*
op_desc
:
block_ops
)
{
size_t
op_idx
=
op_id_to_idx
.
size
();
size_t
op_idx
=
op_id_to_idx
.
size
();
PADDLE_ENFORCE_EQ
(
PADDLE_ENFORCE_EQ
(
op_id_to_idx
.
emplace
(
op_desc
->
Id
(),
op_idx
).
second
,
true
,
op_id_to_idx
.
emplace
(
op_desc
->
Original
Id
(),
op_idx
).
second
,
true
,
platform
::
errors
::
InvalidArgument
(
platform
::
errors
::
InvalidArgument
(
"There should not be duplicate op id: %d"
,
op_desc
->
Id
()));
"There should not be duplicate op id: %d"
,
op_desc
->
Original
Id
()));
}
}
std
::
vector
<
std
::
vector
<
ir
::
Node
::
Dep
>>
dep_matrix
(
op_num
);
std
::
vector
<
std
::
vector
<
ir
::
Node
::
Dep
>>
dep_matrix
(
op_num
);
...
@@ -624,9 +624,9 @@ static std::vector<std::vector<ir::Node::Dep>> GetOpDependencies(
...
@@ -624,9 +624,9 @@ static std::vector<std::vector<ir::Node::Dep>> GetOpDependencies(
for
(
const
auto
&
pair
:
all_preceding_ops
)
{
for
(
const
auto
&
pair
:
all_preceding_ops
)
{
const
auto
*
cur_op_node
=
pair
.
first
;
const
auto
*
cur_op_node
=
pair
.
first
;
size_t
op_idx_1
=
get_op_idx_by_id
(
cur_op_node
->
Op
()
->
Id
());
size_t
op_idx_1
=
get_op_idx_by_id
(
cur_op_node
->
Op
()
->
Original
Id
());
for
(
const
auto
*
preceding_op_node
:
pair
.
second
)
{
for
(
const
auto
*
preceding_op_node
:
pair
.
second
)
{
size_t
op_idx_2
=
get_op_idx_by_id
(
preceding_op_node
->
Op
()
->
Id
());
size_t
op_idx_2
=
get_op_idx_by_id
(
preceding_op_node
->
Op
()
->
Original
Id
());
dep_matrix
[
op_idx_1
][
op_idx_2
]
=
ir
::
Node
::
Dep
::
kAfter
;
dep_matrix
[
op_idx_1
][
op_idx_2
]
=
ir
::
Node
::
Dep
::
kAfter
;
dep_matrix
[
op_idx_2
][
op_idx_1
]
=
ir
::
Node
::
Dep
::
kBefore
;
dep_matrix
[
op_idx_2
][
op_idx_1
]
=
ir
::
Node
::
Dep
::
kBefore
;
}
}
...
...
python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt
浏览文件 @
c00303ec
...
@@ -4,6 +4,6 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
...
@@ -4,6 +4,6 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
foreach
(
TEST_OP
${
TEST_OPS
}
)
foreach
(
TEST_OP
${
TEST_OPS
}
)
py_test_modules
(
${
TEST_OP
}
MODULES
${
TEST_OP
}
)
py_test_modules
(
${
TEST_OP
}
MODULES
${
TEST_OP
}
)
list
(
APPEND DIST_TEST_OPS
${
TEST_OP
}
)
list
(
APPEND DIST_TEST_OPS
${
TEST_OP
}
)
set_tests_properties
(
${
TEST_OP
}
PROPERTIES TIMEOUT
9
0
)
set_tests_properties
(
${
TEST_OP
}
PROPERTIES TIMEOUT
12
0
)
set_tests_properties
(
${
TEST_OP
}
PROPERTIES LABELS
"RUN_TYPE=DIST"
)
set_tests_properties
(
${
TEST_OP
}
PROPERTIES LABELS
"RUN_TYPE=DIST"
)
endforeach
(
TEST_OP
)
endforeach
(
TEST_OP
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录