Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
b333dac0
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b333dac0
编写于
9月 03, 2021
作者:
F
Fan Zhang
提交者:
GitHub
9月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[iscan] bugfix: DLTP-33615 / DLTP-33953 / DLTP-33968 / DLTP-34166 (#35383)
* [iscan] bugfix * test_standalone_executor modify
上级
c171eca2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
11 deletion
+17
-11
python/paddle/fluid/distributed/ps_instance.py
python/paddle/fluid/distributed/ps_instance.py
+1
-1
python/paddle/fluid/incubate/fleet/parameter_server/ir/ps_dispatcher.py
...fluid/incubate/fleet/parameter_server/ir/ps_dispatcher.py
+2
-2
python/paddle/fluid/incubate/fleet/parameter_server/ir/public.py
...paddle/fluid/incubate/fleet/parameter_server/ir/public.py
+10
-4
python/paddle/fluid/tests/unittests/interpreter/test_standalone_executor.py
...d/tests/unittests/interpreter/test_standalone_executor.py
+1
-1
python/paddle/fluid/transpiler/ps_dispatcher.py
python/paddle/fluid/transpiler/ps_dispatcher.py
+3
-3
未找到文件。
python/paddle/fluid/distributed/ps_instance.py
浏览文件 @
b333dac0
...
...
@@ -156,5 +156,5 @@ class PaddlePSInstance(object):
if
__name__
==
"__main__"
:
instance
=
PaddlePSInstance
(
1
,
1
,
2
,
50
)
instance
=
PaddlePSInstance
(
1
,
2
)
instance
.
barrier_all
()
python/paddle/fluid/incubate/fleet/parameter_server/ir/ps_dispatcher.py
浏览文件 @
b333dac0
...
...
@@ -66,7 +66,7 @@ class HashName(PSDispatcher):
"""
def
__init__
(
self
,
pserver_endpoints
):
super
(
self
.
__class__
,
self
).
__init__
(
pserver_endpoints
)
super
(
HashName
,
self
).
__init__
(
pserver_endpoints
)
def
_hash_block
(
self
,
block_str
,
total
):
return
hash
(
block_str
)
%
total
...
...
@@ -106,7 +106,7 @@ class RoundRobin(PSDispatcher):
"""
def
__init__
(
self
,
pserver_endpoints
):
super
(
self
.
__class__
,
self
).
__init__
(
pserver_endpoints
)
super
(
RoundRobin
,
self
).
__init__
(
pserver_endpoints
)
def
dispatch
(
self
,
varlist
):
"""
...
...
python/paddle/fluid/incubate/fleet/parameter_server/ir/public.py
浏览文件 @
b333dac0
...
...
@@ -382,6 +382,7 @@ class CompileTimeStrategy(object):
send_ctx
=
{}
distibuted_varnames
=
get_sparse_tablenames
(
self
.
origin_main_program
,
True
)
idx
=
0
if
not
self
.
is_geo_mode
():
for
merged
in
self
.
merged_dense_pairs
:
...
...
@@ -401,9 +402,10 @@ class CompileTimeStrategy(object):
ctx
=
self
.
build_ctx
(
grad
,
self
.
grad_var_mapping
,
True
,
True
,
True
,
is_distributed
)
send_ctx
[
ctx
.
var_name
()]
=
ctx
idx
+=
1
if
self
.
is_async_mode
():
name
,
ctx
=
self
.
_step_ctx
()
name
,
ctx
=
self
.
_step_ctx
(
idx
)
send_ctx
[
name
]
=
ctx
else
:
for
pairs
in
self
.
origin_sparse_pairs
:
...
...
@@ -427,7 +429,8 @@ class CompileTimeStrategy(object):
param_ctx
.
is_distributed
())
send_ctx
[
ctx
.
var_name
()]
=
ctx
name
,
ctx
=
self
.
_step_ctx
()
idx
+=
1
name
,
ctx
=
self
.
_step_ctx
(
idx
)
send_ctx
[
name
]
=
ctx
return
send_ctx
...
...
@@ -435,6 +438,7 @@ class CompileTimeStrategy(object):
send_ctx
=
{}
distibuted_varnames
=
get_sparse_tablenames
(
self
.
origin_main_program
,
True
)
idx
=
0
if
self
.
is_geo_mode
():
for
pairs
in
self
.
merged_dense_pairs
:
...
...
@@ -451,7 +455,8 @@ class CompileTimeStrategy(object):
ctx
=
self
.
build_ctx
(
param
,
self
.
param_var_mapping
,
False
,
True
,
True
,
is_distributed
)
send_ctx
[
ctx
.
var_name
()]
=
ctx
name
,
ctx
=
self
.
_step_ctx
()
idx
+=
1
name
,
ctx
=
self
.
_step_ctx
(
idx
)
send_ctx
[
name
]
=
ctx
else
:
for
merged
in
self
.
merged_dense_pairs
:
...
...
@@ -469,8 +474,9 @@ class CompileTimeStrategy(object):
ctx
=
self
.
build_ctx
(
grad
,
self
.
grad_var_mapping
,
True
,
True
,
True
,
is_distributed
)
send_ctx
[
ctx
.
var_name
()]
=
ctx
idx
+=
1
name
,
ctx
=
self
.
_step_ctx
()
name
,
ctx
=
self
.
_step_ctx
(
idx
)
send_ctx
[
name
]
=
ctx
return
send_ctx
...
...
python/paddle/fluid/tests/unittests/interpreter/test_standalone_executor.py
浏览文件 @
b333dac0
...
...
@@ -66,7 +66,7 @@ class LinearTestCase(unittest.TestCase):
def
check_cost_info
(
self
,
cost_info
):
if
core
.
is_compiled_with_cuda
():
self
.
assertEqual
(
cost_info
.
host_memory_bytes
(),
16
)
#
self.assertEqual(cost_info.host_memory_bytes(), 16)
self
.
assertGreater
(
cost_info
.
device_memory_bytes
(),
0
)
self
.
assertGreaterEqual
(
cost_info
.
device_total_memory_bytes
(),
cost_info
.
device_memory_bytes
())
...
...
python/paddle/fluid/transpiler/ps_dispatcher.py
浏览文件 @
b333dac0
...
...
@@ -48,7 +48,7 @@ class PSDispatcher(object):
class
HashName
(
PSDispatcher
):
"""
:api_attr: Static Graph
:api_attr: Static Graph
Hash variable names to several endpoints using python
"hash()" function.
...
...
@@ -90,7 +90,7 @@ class HashName(PSDispatcher):
class
RoundRobin
(
PSDispatcher
):
"""
:api_attr: Static Graph
:api_attr: Static Graph
Distribute variables to several endpoints using
RondRobin<https://en.wikipedia.org/wiki/Round-robin_scheduling> method.
...
...
@@ -110,7 +110,7 @@ class RoundRobin(PSDispatcher):
"""
def
__init__
(
self
,
pserver_endpoints
):
super
(
self
.
__class__
,
self
).
__init__
(
pserver_endpoints
)
super
(
RoundRobin
,
self
).
__init__
(
pserver_endpoints
)
def
dispatch
(
self
,
varlist
):
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录