Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
cc12d27f
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看板
未验证
提交
cc12d27f
编写于
8月 17, 2022
作者:
K
kuizhiqing
提交者:
GitHub
8月 17, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tcp LINGER (#45190)
上级
75690584
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
5 addition
and
3 deletion
+5
-3
python/paddle/distributed/launch/context/node.py
python/paddle/distributed/launch/context/node.py
+2
-0
python/paddle/distributed/launch/controllers/collective.py
python/paddle/distributed/launch/controllers/collective.py
+1
-1
python/paddle/distributed/launch/controllers/master.py
python/paddle/distributed/launch/controllers/master.py
+1
-1
python/paddle/distributed/launch/controllers/ps.py
python/paddle/distributed/launch/controllers/ps.py
+1
-1
未找到文件。
python/paddle/distributed/launch/context/node.py
浏览文件 @
cc12d27f
...
@@ -49,6 +49,8 @@ class Node(object):
...
@@ -49,6 +49,8 @@ class Node(object):
for
_
in
range
(
100
):
for
_
in
range
(
100
):
with
closing
(
socket
.
socket
(
socket
.
AF_INET
,
with
closing
(
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
))
as
s
:
socket
.
SOCK_STREAM
))
as
s
:
s
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_LINGER
,
struct
.
pack
(
'ii'
,
1
,
0
))
s
.
bind
((
''
,
0
))
s
.
bind
((
''
,
0
))
port
=
s
.
getsockname
()[
1
]
port
=
s
.
getsockname
()[
1
]
if
port
in
self
.
_allocated_ports
:
if
port
in
self
.
_allocated_ports
:
...
...
python/paddle/distributed/launch/controllers/collective.py
浏览文件 @
cc12d27f
...
@@ -93,7 +93,7 @@ class CollectiveController(Controller):
...
@@ -93,7 +93,7 @@ class CollectiveController(Controller):
self
.
pod
.
replicas
=
self
.
pod_replicas
()
self
.
pod
.
replicas
=
self
.
pod_replicas
()
# rank will be reset when restart
# rank will be reset when restart
self
.
pod
.
rank
=
self
.
ctx
.
args
.
rank
self
.
pod
.
rank
=
int
(
self
.
ctx
.
args
.
rank
)
port
=
self
.
ctx
.
node
.
get_free_port
()
port
=
self
.
ctx
.
node
.
get_free_port
()
...
...
python/paddle/distributed/launch/controllers/master.py
浏览文件 @
cc12d27f
...
@@ -102,7 +102,7 @@ class HTTPMaster(Master):
...
@@ -102,7 +102,7 @@ class HTTPMaster(Master):
print
(
" "
.
join
(
cmd
))
print
(
" "
.
join
(
cmd
))
print
(
"-"
*
80
)
print
(
"-"
*
80
)
if
self
.
ctx
.
args
.
rank
>=
0
:
if
int
(
self
.
ctx
.
args
.
rank
)
>=
0
:
self
.
ctx
.
logger
.
warning
(
self
.
ctx
.
logger
.
warning
(
"--rank set in the command may not compatible in auto mode"
)
"--rank set in the command may not compatible in auto mode"
)
...
...
python/paddle/distributed/launch/controllers/ps.py
浏览文件 @
cc12d27f
...
@@ -111,7 +111,7 @@ class PSController(Controller):
...
@@ -111,7 +111,7 @@ class PSController(Controller):
def
_build_pod_with_master
(
self
):
def
_build_pod_with_master
(
self
):
self
.
pod
.
rank
=
self
.
ctx
.
args
.
rank
self
.
pod
.
rank
=
int
(
self
.
ctx
.
args
.
rank
)
server_num
=
self
.
ctx
.
args
.
server_num
or
1
server_num
=
self
.
ctx
.
args
.
server_num
or
1
servers
=
[
servers
=
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录