Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
52ff3f48
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看板
未验证
提交
52ff3f48
编写于
5月 26, 2022
作者:
S
ShenLiang
提交者:
GitHub
5月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix pipeline on processgroup (#42989)
上级
5b86e190
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
3 deletion
+15
-3
python/paddle/distributed/collective.py
python/paddle/distributed/collective.py
+5
-0
python/paddle/distributed/fleet/meta_parallel/pp_utils/p2p_communication.py
...ributed/fleet/meta_parallel/pp_utils/p2p_communication.py
+10
-3
未找到文件。
python/paddle/distributed/collective.py
浏览文件 @
52ff3f48
...
@@ -403,6 +403,11 @@ def new_group(ranks=None, backend=None):
...
@@ -403,6 +403,11 @@ def new_group(ranks=None, backend=None):
_group_map_by_name
[
group_name
]
=
group
_group_map_by_name
[
group_name
]
=
group
_group_map
[
gid
]
=
group
_group_map
[
gid
]
=
group
# TODO(shenliang03): This is a temporary solution to solve the problem of
# hang caused by tcp
tmp
=
paddle
.
to_tensor
([
1
],
dtype
=
"int32"
)
paddle
.
distributed
.
all_reduce
(
tmp
,
group
=
group
,
use_calc_stream
=
True
)
paddle
.
distributed
.
wait
(
tmp
)
return
group
return
group
if
not
backend
:
if
not
backend
:
...
...
python/paddle/distributed/fleet/meta_parallel/pp_utils/p2p_communication.py
浏览文件 @
52ff3f48
...
@@ -18,6 +18,7 @@ from ...utils.log_util import logger
...
@@ -18,6 +18,7 @@ from ...utils.log_util import logger
import
numpy
as
np
import
numpy
as
np
from
paddle
import
_C_ops
from
paddle
import
_C_ops
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.framework
import
_in_legacy_dygraph
,
_non_static_mode
,
in_dygraph_mode
_hcg
=
None
_hcg
=
None
_use_cache
=
False
_use_cache
=
False
...
@@ -148,9 +149,15 @@ _send_recv_meta = SendRecvMeta()
...
@@ -148,9 +149,15 @@ _send_recv_meta = SendRecvMeta()
def
_is_valid_send_recv_partial
(
tensor
,
mp_degree
):
def
_is_valid_send_recv_partial
(
tensor
,
mp_degree
):
if
_in_legacy_dygraph
():
tensor_numel
=
np
.
prod
(
tensor
.
shape
)
tensor_numel
=
np
.
prod
(
tensor
.
shape
)
assert
tensor_numel
!=
0
,
"can't send/recv zero element"
assert
tensor_numel
!=
0
,
"can't send/recv zero element"
return
mp_degree
>
1
and
tensor_numel
%
mp_degree
==
0
return
mp_degree
>
1
and
tensor_numel
%
mp_degree
==
0
elif
in_dygraph_mode
():
# TODO(shenliang03) support mp+pp optimizer in future.
# (partial_send/partial_recv/partial_allgather_)
return
False
def
send_partial
(
tensor
,
def
send_partial
(
tensor
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录