Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
3755564a
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3755564a
编写于
8月 07, 2020
作者:
T
tangwei12
提交者:
GitHub
8月 07, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix/large scale fix (#25999)
* fix large scale KV * fix single training using async ssa graph
上级
751305ec
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
31 addition
and
10 deletion
+31
-10
paddle/fluid/framework/details/async_ssa_graph_executor.cc
paddle/fluid/framework/details/async_ssa_graph_executor.cc
+29
-8
python/paddle/fluid/incubate/fleet/parameter_server/distribute_transpiler/__init__.py
.../fleet/parameter_server/distribute_transpiler/__init__.py
+1
-1
python/paddle/fluid/incubate/fleet/parameter_server/ir/public.py
...paddle/fluid/incubate/fleet/parameter_server/ir/public.py
+1
-1
未找到文件。
paddle/fluid/framework/details/async_ssa_graph_executor.cc
浏览文件 @
3755564a
...
@@ -45,6 +45,26 @@ inline void InitVarsInScope(const std::vector<VarInfo> &var_infos, Scope *scope,
...
@@ -45,6 +45,26 @@ inline void InitVarsInScope(const std::vector<VarInfo> &var_infos, Scope *scope,
// get CommContext and remote send and recv op
// get CommContext and remote send and recv op
void
ProcessGraph
(
std
::
vector
<
ir
::
Graph
*>
graphs
,
Scope
*
scope
)
{
void
ProcessGraph
(
std
::
vector
<
ir
::
Graph
*>
graphs
,
Scope
*
scope
)
{
#ifdef PADDLE_WITH_DISTRIBUTE
#ifdef PADDLE_WITH_DISTRIBUTE
bool
need_communicator
=
false
;
for
(
auto
&
node
:
graphs
[
0
]
->
Nodes
())
{
VLOG
(
3
)
<<
"node name "
<<
node
->
Name
();
if
(
node
&&
node
->
IsOp
())
{
if
(
node
->
Name
()
==
"send"
)
{
auto
send_varnames
=
BOOST_GET_CONST
(
std
::
vector
<
std
::
string
>
,
node
->
Op
()
->
GetNullableAttr
(
"send_varnames"
));
if
(
send_varnames
.
size
()
>
0
)
{
need_communicator
=
true
;
break
;
}
}
}
}
if
(
need_communicator
)
{
// init communicator here
// init communicator here
auto
*
instance
=
operators
::
distributed
::
Communicator
::
GetInstance
();
auto
*
instance
=
operators
::
distributed
::
Communicator
::
GetInstance
();
auto
initialized
=
instance
?
true
:
false
;
auto
initialized
=
instance
?
true
:
false
;
...
@@ -53,6 +73,7 @@ void ProcessGraph(std::vector<ir::Graph *> graphs, Scope *scope) {
...
@@ -53,6 +73,7 @@ void ProcessGraph(std::vector<ir::Graph *> graphs, Scope *scope) {
"Communicator is not Initialized, you may use "
"Communicator is not Initialized, you may use "
"FleetAPI(https://github.com/PaddlePaddle/Fleet/tree/"
"FleetAPI(https://github.com/PaddlePaddle/Fleet/tree/"
"develop/markdown_doc/transpiler)"
));
"develop/markdown_doc/transpiler)"
));
}
#endif
#endif
}
}
...
...
python/paddle/fluid/incubate/fleet/parameter_server/distribute_transpiler/__init__.py
浏览文件 @
3755564a
...
@@ -579,7 +579,7 @@ class FleetTranspiler(Fleet):
...
@@ -579,7 +579,7 @@ class FleetTranspiler(Fleet):
block
.
append_op
(
block
.
append_op
(
type
=
'recv_save'
,
type
=
'recv_save'
,
attrs
=
{
attrs
=
{
"trainer_id"
:
self
.
_role_maker
.
worker_i
d
(),
"trainer_id"
:
self
.
_role_maker
.
worker_i
ndex
(),
"shape"
:
var
.
shape
,
"shape"
:
var
.
shape
,
"slice_shapes"
:
"slice_shapes"
:
[
","
.
join
([
str
(
i
)
for
i
in
var
.
shape
])],
[
","
.
join
([
str
(
i
)
for
i
in
var
.
shape
])],
...
...
python/paddle/fluid/incubate/fleet/parameter_server/ir/public.py
浏览文件 @
3755564a
...
@@ -329,7 +329,7 @@ class CompileTimeStrategy(object):
...
@@ -329,7 +329,7 @@ class CompileTimeStrategy(object):
is_distributed
=
True
if
param_name
in
distibuted_varnames
else
False
is_distributed
=
True
if
param_name
in
distibuted_varnames
else
False
ctx
=
self
.
build_ctx
(
grad
,
self
.
grad_var_mapping
,
True
,
Fals
e
,
ctx
=
self
.
build_ctx
(
grad
,
self
.
grad_var_mapping
,
True
,
Tru
e
,
True
,
is_distributed
)
True
,
is_distributed
)
send_ctx
[
ctx
.
var_name
()]
=
ctx
send_ctx
[
ctx
.
var_name
()]
=
ctx
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录