Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
0fe2001a
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0fe2001a
编写于
4月 02, 2022
作者:
L
Leo Chen
提交者:
GitHub
4月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make variable 'gradient_merge_cond' local (#41262)
上级
acec26a1
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
6 addition
and
21 deletion
+6
-21
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
...e/distributed/fleet/meta_optimizers/sharding_optimizer.py
+2
-7
python/paddle/distributed/passes/auto_parallel_gradient_merge.py
...paddle/distributed/passes/auto_parallel_gradient_merge.py
+2
-7
python/paddle/fluid/optimizer.py
python/paddle/fluid/optimizer.py
+2
-7
未找到文件。
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
浏览文件 @
0fe2001a
...
...
@@ -1621,13 +1621,8 @@ class ShardingOptimizer(MetaOptimizerBase):
persistable
=
True
,
force_cpu
=
True
)
cond_var
=
layers
.
create_global_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
value
=
bool
(
0
),
dtype
=
'bool'
,
persistable
=
False
,
force_cpu
=
True
)
cond_var
=
main_block
.
create_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
dtype
=
'bool'
)
with
device_guard
(
"cpu"
):
# step_var = (step_var + 1) % k_step
...
...
python/paddle/distributed/passes/auto_parallel_gradient_merge.py
浏览文件 @
0fe2001a
...
...
@@ -107,13 +107,8 @@ def _get_gm_cond_var(main_program, k_steps, dist_context):
force_cpu
=
True
)
set_var_dist_attr
(
dist_context
,
step_var
,
[
-
1
],
world_process_group
.
ranks
)
cond_var
=
layers
.
create_global_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
value
=
bool
(
0
),
dtype
=
'bool'
,
persistable
=
False
,
force_cpu
=
True
)
cond_var
=
main_block
.
create_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
dtype
=
'bool'
)
set_var_dist_attr
(
dist_context
,
cond_var
,
[
-
1
],
world_process_group
.
ranks
)
with
device_guard
(
"cpu"
):
...
...
python/paddle/fluid/optimizer.py
浏览文件 @
0fe2001a
...
...
@@ -7098,13 +7098,8 @@ class GradientMergeOptimizer(object):
persistable
=
True
,
force_cpu
=
True
)
cond_var
=
layers
.
create_global_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
value
=
bool
(
0
),
dtype
=
'bool'
,
persistable
=
False
,
force_cpu
=
True
)
cond_var
=
main_block
.
create_var
(
name
=
"gradient_merge_cond"
,
shape
=
[
1
],
dtype
=
'bool'
)
with
device_guard
(
"cpu"
):
# step_var = (step_var + 1) % k_step
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录