Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c9b79989
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
提交
c9b79989
编写于
12月 13, 2018
作者:
D
dongdaxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tag in async_executor
上级
95b887c4
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
336 addition
and
334 deletion
+336
-334
paddle/fluid/framework/async_executor.cc
paddle/fluid/framework/async_executor.cc
+119
-119
paddle/fluid/framework/async_executor.h
paddle/fluid/framework/async_executor.h
+4
-1
paddle/fluid/framework/executor_thread_worker.cc
paddle/fluid/framework/executor_thread_worker.cc
+124
-125
paddle/fluid/framework/executor_thread_worker.h
paddle/fluid/framework/executor_thread_worker.h
+89
-89
未找到文件。
paddle/fluid/framework/async_executor.cc
浏览文件 @
c9b79989
...
@@ -103,16 +103,16 @@ void AsyncExecutor::GatherServers(
...
@@ -103,16 +103,16 @@ void AsyncExecutor::GatherServers(
void
AsyncExecutor
::
InitParamConfig
()
{
void
AsyncExecutor
::
InitParamConfig
()
{
for
(
int
i
=
0
;
i
<
for
(
int
i
=
0
;
i
<
_pslib_ptr
->
get_param
()
->
server_param
().
\
_pslib_ptr
->
get_param
()
->
server_param
().
\
downpour_server_param
().
\
downpour_server_param
().
\
downpour_table_param_size
();
downpour_table_param_size
();
++
i
)
{
++
i
)
{
if
(
_pslib_ptr
->
get_param
()
->
server_param
().
\
if
(
_pslib_ptr
->
get_param
()
->
server_param
().
\
downpour_server_param
().
downpour_table_param
(
i
).
\
downpour_server_param
().
downpour_table_param
(
i
).
\
table_class
().
find
(
"SparseTable"
)
!=
-
1
)
{
table_class
().
find
(
"SparseTable"
)
!=
-
1
)
{
_param_config
.
fea_dim
=
_pslib_ptr
->
get_param
()
->
server_param
().
\
_param_config
.
fea_dim
=
_pslib_ptr
->
get_param
()
->
server_param
().
\
downpour_server_param
().
\
downpour_server_param
().
\
downpour_table_param
(
i
).
\
downpour_table_param
(
i
).
\
accessor
().
fea_dim
();
accessor
().
fea_dim
();
break
;
break
;
}
}
...
...
paddle/fluid/framework/async_executor.h
浏览文件 @
c9b79989
...
@@ -45,7 +45,8 @@ inline std::default_random_engine& local_random_engine() {
...
@@ -45,7 +45,8 @@ inline std::default_random_engine& local_random_engine() {
engine_wrapper_t
()
{
engine_wrapper_t
()
{
static
std
::
atomic
<
uint64_t
>
x
(
0
);
static
std
::
atomic
<
uint64_t
>
x
(
0
);
std
::
seed_seq
sseq
=
{
x
++
,
x
++
,
x
++
,
std
::
seed_seq
sseq
=
{
x
++
,
x
++
,
x
++
,
static_cast
<
uint64_t
>
(
current_realtime
()
*
1000
)};
static_cast
<
uint64_t
>
(
current_realtime
()
*
1000
)};
engine
.
seed
(
sseq
);
engine
.
seed
(
sseq
);
}
}
};
};
...
@@ -77,6 +78,7 @@ class AsyncExecutor {
...
@@ -77,6 +78,7 @@ class AsyncExecutor {
void
SaveModel
(
const
std
::
string
&
path
);
void
SaveModel
(
const
std
::
string
&
path
);
void
InitParamConfig
();
void
InitParamConfig
();
#endif
#endif
private:
private:
void
CreateThreads
(
ExecutorThreadWorker
*
worker
,
void
CreateThreads
(
ExecutorThreadWorker
*
worker
,
const
ProgramDesc
&
main_program
,
const
ProgramDesc
&
main_program
,
...
@@ -87,6 +89,7 @@ class AsyncExecutor {
...
@@ -87,6 +89,7 @@ class AsyncExecutor {
#ifdef PADDLE_WITH_PSLIB
#ifdef PADDLE_WITH_PSLIB
void
PrepareDenseThread
(
const
std
::
string
&
mode
);
void
PrepareDenseThread
(
const
std
::
string
&
mode
);
#endif
#endif
public:
public:
#ifdef PADDLE_WITH_PSLIB
#ifdef PADDLE_WITH_PSLIB
std
::
shared_ptr
<
paddle
::
distributed
::
PSlib
>
_pslib_ptr
;
std
::
shared_ptr
<
paddle
::
distributed
::
PSlib
>
_pslib_ptr
;
...
...
paddle/fluid/framework/executor_thread_worker.cc
浏览文件 @
c9b79989
...
@@ -440,7 +440,6 @@ void AsyncExecutorThreadWorker::PushDense(int table_id) {
...
@@ -440,7 +440,6 @@ void AsyncExecutorThreadWorker::PushDense(int table_id) {
auto
status
=
_pslib_ptr
->
_worker_ptr
->
push_dense
(
auto
status
=
_pslib_ptr
->
_worker_ptr
->
push_dense
(
regions
.
data
(),
regions
.
size
(),
table_id
);
regions
.
data
(),
regions
.
size
(),
table_id
);
_push_dense_status
.
push_back
(
std
::
move
(
status
));
_push_dense_status
.
push_back
(
std
::
move
(
status
));
}
}
void
AsyncExecutorThreadWorker
::
PullSparse
(
int
table_id
)
{
void
AsyncExecutorThreadWorker
::
PullSparse
(
int
table_id
)
{
...
...
paddle/fluid/framework/executor_thread_worker.h
浏览文件 @
c9b79989
...
@@ -136,7 +136,7 @@ class DensePullThread {
...
@@ -136,7 +136,7 @@ class DensePullThread {
class
ExecutorThreadWorker
{
class
ExecutorThreadWorker
{
public:
public:
ExecutorThreadWorker
()
ExecutorThreadWorker
()
:
thread_id_
(
-
1
),
root_scope_
(
NULL
),
thread_scope_
(
NULL
),
debug_
(
false
)
{}
:
thread_id_
(
-
1
),
root_scope_
(
NULL
),
thread_scope_
(
NULL
),
debug_
(
false
)
{}
virtual
~
ExecutorThreadWorker
()
{}
virtual
~
ExecutorThreadWorker
()
{}
...
@@ -160,7 +160,7 @@ class ExecutorThreadWorker {
...
@@ -160,7 +160,7 @@ class ExecutorThreadWorker {
void
SetFetchVarNames
(
const
std
::
vector
<
std
::
string
>&
fetch_var_names
);
void
SetFetchVarNames
(
const
std
::
vector
<
std
::
string
>&
fetch_var_names
);
#ifdef PADDLE_WITH_PSLIB
#ifdef PADDLE_WITH_PSLIB
virtual
void
SetPSlibPtr
(
virtual
void
SetPSlibPtr
(
std
::
shared_ptr
<
paddle
::
distributed
::
PSlib
>
pslib_ptr
)
{}
;
std
::
shared_ptr
<
paddle
::
distributed
::
PSlib
>
pslib_ptr
)
{}
virtual
void
SetPullDenseThread
(
virtual
void
SetPullDenseThread
(
std
::
shared_ptr
<
DensePullThread
>
dpt
)
{}
std
::
shared_ptr
<
DensePullThread
>
dpt
)
{}
virtual
void
SetParamConfig
(
virtual
void
SetParamConfig
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录