Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
urhero
Paddle
提交
9d8ec423
P
Paddle
项目概览
urhero
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d8ec423
编写于
10月 31, 2019
作者:
W
WangXi
提交者:
gongweibao
10月 31, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
launch.py remove setting for nccl sync, test=develop (#20909)
上级
b6260f38
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
11 deletion
+2
-11
python/paddle/distributed/launch.py
python/paddle/distributed/launch.py
+2
-11
未找到文件。
python/paddle/distributed/launch.py
浏览文件 @
9d8ec423
...
@@ -71,7 +71,7 @@ def _parse_args():
...
@@ -71,7 +71,7 @@ def _parse_args():
parser
=
ArgumentParser
(
parser
=
ArgumentParser
(
description
=
'''start paddle training using multi-process mode.
description
=
'''start paddle training using multi-process mode.
NOTE: your train program ***must*** run as distributed nccl2 mode,
NOTE: your train program ***must*** run as distributed nccl2 mode,
see: http://www.paddlepaddle.org/documentation/docs/zh/1.
2
/user_guides/howto/training/cluster_howto.html#permalink-8--nccl2-
see: http://www.paddlepaddle.org/documentation/docs/zh/1.
6
/user_guides/howto/training/cluster_howto.html#permalink-8--nccl2-
And your train program must read environment variables below in order to let different
And your train program must read environment variables below in order to let different
process init properly:
process init properly:
FLAGS_selected_gpus
FLAGS_selected_gpus
...
@@ -147,9 +147,6 @@ def terminate_procs(procs):
...
@@ -147,9 +147,6 @@ def terminate_procs(procs):
def
start_procs
(
args
):
def
start_procs
(
args
):
"""
"""
"""
"""
procs
=
[]
log_fns
=
[]
default_env
=
os
.
environ
.
copy
()
default_env
=
os
.
environ
.
copy
()
current_node_ip
=
args
.
node_ip
current_node_ip
=
args
.
node_ip
...
@@ -213,12 +210,11 @@ paddlecloud environment.".format(args.cluster_node_ips, node_ips))
...
@@ -213,12 +210,11 @@ paddlecloud environment.".format(args.cluster_node_ips, node_ips))
current_env
.
pop
(
"https_proxy"
,
None
)
current_env
.
pop
(
"https_proxy"
,
None
)
procs
=
[]
procs
=
[]
log_fns
=
[]
cmds
=
[]
cmds
=
[]
ranks
=
[]
ranks
=
[]
for
i
in
range
(
0
,
selected_gpus_num
):
for
i
in
range
(
0
,
selected_gpus_num
):
rank
=
(
node_id
*
selected_gpus_num
+
i
)
rank
=
(
node_id
*
selected_gpus_num
+
i
)
current_env
.
update
({
current_env
.
update
({
"FLAGS_selected_gpus"
:
"%s"
%
selected_gpus
[
i
],
"FLAGS_selected_gpus"
:
"%s"
%
selected_gpus
[
i
],
"PADDLE_TRAINER_ID"
:
"%d"
%
rank
,
"PADDLE_TRAINER_ID"
:
"%d"
%
rank
,
...
@@ -228,19 +224,14 @@ paddlecloud environment.".format(args.cluster_node_ips, node_ips))
...
@@ -228,19 +224,14 @@ paddlecloud environment.".format(args.cluster_node_ips, node_ips))
"PADDLE_TRAINER_ENDPOINTS"
:
trainers_endpoints
"PADDLE_TRAINER_ENDPOINTS"
:
trainers_endpoints
})
})
if
num_nodes
>
1
:
current_env
.
update
({
"FLAGS_sync_nccl_allreduce"
:
"0"
})
cmd
=
[
sys
.
executable
,
"-u"
,
args
.
training_script
cmd
=
[
sys
.
executable
,
"-u"
,
args
.
training_script
]
+
args
.
training_script_args
]
+
args
.
training_script_args
cmds
.
append
(
cmd
)
cmds
.
append
(
cmd
)
if
args
.
log_dir
is
not
None
:
if
args
.
log_dir
is
not
None
:
os
.
system
(
"mkdir -p {}"
.
format
(
args
.
log_dir
))
os
.
system
(
"mkdir -p {}"
.
format
(
args
.
log_dir
))
fn
=
open
(
"%s/workerlog.%d"
%
(
args
.
log_dir
,
i
),
"w"
)
fn
=
open
(
"%s/workerlog.%d"
%
(
args
.
log_dir
,
i
),
"w"
)
log_fns
.
append
(
fn
)
log_fns
.
append
(
fn
)
proc
=
subprocess
.
Popen
(
cmd
,
env
=
current_env
,
stdout
=
fn
,
stderr
=
fn
)
proc
=
subprocess
.
Popen
(
cmd
,
env
=
current_env
,
stdout
=
fn
,
stderr
=
fn
)
else
:
else
:
proc
=
subprocess
.
Popen
(
cmd
,
env
=
current_env
)
proc
=
subprocess
.
Popen
(
cmd
,
env
=
current_env
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录