Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
030c0b91
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
030c0b91
编写于
1月 18, 2018
作者:
A
Abhinav Arora
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not send to optimize_ops to distribute transpiler again
上级
7905e367
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
10 addition
and
10 deletion
+10
-10
python/paddle/v2/fluid/distribute_transpiler.py
python/paddle/v2/fluid/distribute_transpiler.py
+4
-4
python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py
.../v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py
+1
-1
python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py
...tests/book_distribute/notest_dist_label_semantic_roles.py
+1
-1
python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py
...le/v2/fluid/tests/book_distribute/notest_dist_word2vec.py
+1
-1
python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py
...ests/book_distribute/notest_recognize_digits_conv_dist.py
+1
-1
python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py
...tests/book_distribute/notest_recognize_digits_mlp_dist.py
+1
-1
python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py
.../book_distribute/notest_understand_sentiment_conv_dist.py
+1
-1
未找到文件。
python/paddle/v2/fluid/distribute_transpiler.py
浏览文件 @
030c0b91
...
@@ -407,7 +407,7 @@ class DistributeTranspiler:
...
@@ -407,7 +407,7 @@ class DistributeTranspiler:
outputs
=
opt_op
.
outputs
,
outputs
=
opt_op
.
outputs
,
attrs
=
opt_op
.
attrs
)
attrs
=
opt_op
.
attrs
)
def
get_pserver_program
(
self
,
endpoint
,
optimize_ops
):
def
get_pserver_program
(
self
,
endpoint
):
"""
"""
get pserver side program by endpoint
get pserver side program by endpoint
...
@@ -422,9 +422,9 @@ class DistributeTranspiler:
...
@@ -422,9 +422,9 @@ class DistributeTranspiler:
self
.
_clone_var
(
pserver_program
.
global_block
(),
v
)
self
.
_clone_var
(
pserver_program
.
global_block
(),
v
)
# step6
# step6
optimize_sub_program
=
Program
()
optimize_sub_program
=
Program
()
for
idx
,
opt_op
in
enumerate
(
optimize_ops
):
for
idx
,
opt_op
in
enumerate
(
self
.
optimize_ops
):
is_op_on_pserver
=
self
.
_is_op_on_pserver
(
endpoint
,
optimize_ops
,
is_op_on_pserver
=
self
.
_is_op_on_pserver
(
endpoint
,
idx
)
self
.
optimize_ops
,
idx
)
if
not
is_op_on_pserver
:
if
not
is_op_on_pserver
:
continue
continue
if
opt_op
.
inputs
.
has_key
(
"Grad"
):
if
opt_op
.
inputs
.
has_key
(
"Grad"
):
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py
浏览文件 @
030c0b91
...
@@ -53,7 +53,7 @@ if training_role == "PSERVER":
...
@@ -53,7 +53,7 @@ if training_role == "PSERVER":
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
else
:
else
:
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py
浏览文件 @
030c0b91
...
@@ -197,7 +197,7 @@ def main():
...
@@ -197,7 +197,7 @@ def main():
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
elif
training_role
==
"TRAINER"
:
elif
training_role
==
"TRAINER"
:
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_dist_word2vec.py
浏览文件 @
030c0b91
...
@@ -87,7 +87,7 @@ if training_role == "PSERVER":
...
@@ -87,7 +87,7 @@ if training_role == "PSERVER":
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
elif
training_role
==
"TRAINER"
:
elif
training_role
==
"TRAINER"
:
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py
浏览文件 @
030c0b91
...
@@ -66,7 +66,7 @@ if training_role == "PSERVER":
...
@@ -66,7 +66,7 @@ if training_role == "PSERVER":
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
elif
training_role
==
"TRAINER"
:
elif
training_role
==
"TRAINER"
:
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py
浏览文件 @
030c0b91
...
@@ -60,7 +60,7 @@ if training_role == "PSERVER":
...
@@ -60,7 +60,7 @@ if training_role == "PSERVER":
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
fluid
.
default_startup_program
())
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
elif
training_role
==
"TRAINER"
:
elif
training_role
==
"TRAINER"
:
...
...
python/paddle/v2/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py
浏览文件 @
030c0b91
...
@@ -98,7 +98,7 @@ def main():
...
@@ -98,7 +98,7 @@ def main():
if
not
current_endpoint
:
if
not
current_endpoint
:
print
(
"need env SERVER_ENDPOINT"
)
print
(
"need env SERVER_ENDPOINT"
)
exit
(
1
)
exit
(
1
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
,
optimize_ops
)
pserver_prog
=
t
.
get_pserver_program
(
current_endpoint
)
exe
.
run
(
pserver_prog
)
exe
.
run
(
pserver_prog
)
elif
training_role
==
"TRAINER"
:
elif
training_role
==
"TRAINER"
:
trainer_prog
=
t
.
get_trainer_program
()
trainer_prog
=
t
.
get_trainer_program
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录