Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
9012e8bc
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看板
未验证
提交
9012e8bc
编写于
9月 15, 2022
作者:
C
Charles-hit
提交者:
GitHub
9月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix distributed bug caused by fill_any_like (#45978) (#46041)
上级
526e0323
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
5 deletion
+5
-5
python/paddle/distributed/auto_parallel/completion.py
python/paddle/distributed/auto_parallel/completion.py
+2
-2
python/paddle/distributed/auto_parallel/operators/dist_default.py
...addle/distributed/auto_parallel/operators/dist_default.py
+2
-2
python/paddle/distributed/auto_parallel/utils.py
python/paddle/distributed/auto_parallel/utils.py
+1
-1
未找到文件。
python/paddle/distributed/auto_parallel/completion.py
浏览文件 @
9012e8bc
...
@@ -1037,7 +1037,7 @@ class Completer:
...
@@ -1037,7 +1037,7 @@ class Completer:
grad_op_dist_attr
.
set_output_dims_mapping
(
grad_op_dist_attr
.
set_output_dims_mapping
(
output_name
,
ref_fwd_dims_mapping
)
output_name
,
ref_fwd_dims_mapping
)
elif
grad_op
.
type
==
'fill_
zeros
_like'
:
elif
grad_op
.
type
==
'fill_
any
_like'
:
ref_var_name
=
grad_op
.
input_arg_names
[
0
]
ref_var_name
=
grad_op
.
input_arg_names
[
0
]
ref_var
=
vars
[
ref_var_name
]
ref_var
=
vars
[
ref_var_name
]
ref_dist_attr
=
self
.
_dist_context
.
get_tensor_dist_attr_for_program
(
ref_dist_attr
=
self
.
_dist_context
.
get_tensor_dist_attr_for_program
(
...
@@ -1274,7 +1274,7 @@ class Completer:
...
@@ -1274,7 +1274,7 @@ class Completer:
grad_op_dist_attr
.
impl_type
=
"default"
grad_op_dist_attr
.
impl_type
=
"default"
grad_op_dist_attr
.
impl_idx
=
0
grad_op_dist_attr
.
impl_idx
=
0
elif
grad_op
.
type
==
'fill_
zeros
_like'
:
elif
grad_op
.
type
==
'fill_
any
_like'
:
ref_var_name
=
grad_op
.
input_arg_names
[
0
]
ref_var_name
=
grad_op
.
input_arg_names
[
0
]
ref_var
=
vars
[
ref_var_name
]
ref_var
=
vars
[
ref_var_name
]
ref_dist_attr
=
self
.
_dist_context
.
get_tensor_dist_attr_for_program
(
ref_dist_attr
=
self
.
_dist_context
.
get_tensor_dist_attr_for_program
(
...
...
python/paddle/distributed/auto_parallel/operators/dist_default.py
浏览文件 @
9012e8bc
...
@@ -348,7 +348,7 @@ class DistributedDefaultImpl0(DistributedOperatorImpl):
...
@@ -348,7 +348,7 @@ class DistributedDefaultImpl0(DistributedOperatorImpl):
else
:
else
:
batch_dim_mappings
.
append
(
dims_mapping
[
1
])
batch_dim_mappings
.
append
(
dims_mapping
[
1
])
for
arg_name
in
op_desc
.
output_arg_names
():
for
arg_name
in
op_desc
.
output_arg_names
():
if
op_desc
.
type
()
==
"fill_zeros_like"
:
if
op_desc
.
type
()
==
'fill_any_like'
:
input_tensor
=
dist_op
.
get_serial_input
(
input_tensor
=
dist_op
.
get_serial_input
(
op_desc
.
input_arg_names
()[
0
])
op_desc
.
input_arg_names
()[
0
])
if
input_tensor
.
is_parameter
:
if
input_tensor
.
is_parameter
:
...
@@ -387,7 +387,7 @@ class DistributedDefaultImpl0(DistributedOperatorImpl):
...
@@ -387,7 +387,7 @@ class DistributedDefaultImpl0(DistributedOperatorImpl):
dims_mapping
[
1
]
=
compatible_dim_mapping
dims_mapping
[
1
]
=
compatible_dim_mapping
changed
=
True
changed
=
True
for
arg_name
in
op_desc
.
output_arg_names
():
for
arg_name
in
op_desc
.
output_arg_names
():
if
op_desc
.
type
()
==
"fill_zeros_like"
:
if
op_desc
.
type
()
==
'fill_any_like'
:
input_tensor
=
dist_op
.
get_serial_input
(
input_tensor
=
dist_op
.
get_serial_input
(
op_desc
.
input_arg_names
()[
0
])
op_desc
.
input_arg_names
()[
0
])
if
input_tensor
.
is_parameter
:
if
input_tensor
.
is_parameter
:
...
...
python/paddle/distributed/auto_parallel/utils.py
浏览文件 @
9012e8bc
...
@@ -1040,7 +1040,7 @@ def set_grad_var_shape(program, dist_context):
...
@@ -1040,7 +1040,7 @@ def set_grad_var_shape(program, dist_context):
if
op
.
type
in
[
if
op
.
type
in
[
"c_allreduce_sum"
,
"c_identity"
,
"scale"
,
"cast"
,
"c_allreduce_sum"
,
"c_identity"
,
"scale"
,
"cast"
,
"fill_zeros_like"
'fill_any_like'
]:
]:
forward_var_name
=
op
.
input_arg_names
[
0
]
forward_var_name
=
op
.
input_arg_names
[
0
]
elif
op
.
type
==
"matmul_v2_grad"
or
op
.
type
==
"matmul_grad"
or
op
.
type
==
"mul_grad"
:
elif
op
.
type
==
"matmul_v2_grad"
or
op
.
type
==
"matmul_grad"
or
op
.
type
==
"mul_grad"
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录