Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
a0b59773
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看板
提交
a0b59773
编写于
3月 23, 2019
作者:
D
dongdaxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix code style
上级
f39b323e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
14 deletion
+16
-14
paddle/fluid/framework/async_executor.cc
paddle/fluid/framework/async_executor.cc
+1
-2
paddle/fluid/framework/fleet/fleet_wrapper.h
paddle/fluid/framework/fleet/fleet_wrapper.h
+8
-9
paddle/fluid/framework/io/shell.cc
paddle/fluid/framework/io/shell.cc
+1
-1
paddle/fluid/framework/io/shell.h
paddle/fluid/framework/io/shell.h
+4
-0
paddle/fluid/platform/lodtensor_printer_test.cc
paddle/fluid/platform/lodtensor_printer_test.cc
+2
-2
未找到文件。
paddle/fluid/framework/async_executor.cc
浏览文件 @
a0b59773
...
...
@@ -155,8 +155,7 @@ void AsyncExecutor::RunFromFile(const ProgramDesc& main_program,
}
#ifdef PADDLE_WITH_PSLIB
if
(
mode
==
"mpi"
)
{
// todo ?
//_pull_dense_thread->stop();
_pull_dense_thread
->
stop
();
}
#endif
VLOG
(
3
)
<<
"start to run from files in async_executor"
;
...
...
paddle/fluid/framework/fleet/fleet_wrapper.h
浏览文件 @
a0b59773
...
...
@@ -21,13 +21,14 @@ limitations under the License. */
#endif
#include <atomic>
#include <ctime>
#include <map>
#include <random>
#include <string>
#include <vector>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/scope.h"
#include "paddle/fluid/framework/variable_helper.h"
#include "paddle/fluid/platform/macros.h" // for DISABLE_COPY_AND_ASSIGN
#include "paddle/fluid/framework/program_desc.h"
namespace
paddle
{
namespace
framework
{
...
...
@@ -72,9 +73,8 @@ class FleetWrapper {
const
std
::
vector
<
std
::
string
>&
var_names
,
std
::
vector
<::
std
::
future
<
int32_t
>>*
pull_dense_status
);
void
PushDenseParamSync
(
const
ProgramDesc
&
program
,
const
uint64_t
table_id
,
const
std
::
vector
<
std
::
string
>&
var_names
);
void
PushDenseParamSync
(
const
ProgramDesc
&
program
,
const
uint64_t
table_id
,
const
std
::
vector
<
std
::
string
>&
var_names
);
// Push dense variables to server in async mode
// Param<in>: scope, table_id, var_names,
...
...
@@ -122,13 +122,12 @@ class FleetWrapper {
uint64_t
RunServer
();
void
GatherServers
(
const
std
::
vector
<
uint64_t
>&
host_sign_list
,
int
node_num
);
typedef
std
::
function
<
int32_t
(
int
,
int
,
const
std
::
string
&
)
>
MsgHandlerFunc
;
typedef
std
::
function
<
int32_t
(
int
,
int
,
const
std
::
string
&
)
>
MsgHandlerFunc
;
int
RegisterClientToClientMsgHandler
(
int
msg_type
,
MsgHandlerFunc
handler
);
std
::
future
<
int32_t
>
SendClientToClientMsg
(
int
msg_type
,
int
to_client_id
,
const
std
::
string
&
msg
);
std
::
default_random_engine
&
LocalRandomEngine
();
std
::
future
<
int32_t
>
SendClientToClientMsg
(
int
msg_type
,
int
to_client_id
,
const
std
::
string
&
msg
);
std
::
default_random_engine
&
LocalRandomEngine
();
template
<
typename
T
>
void
Serialize
(
const
std
::
vector
<
T
*>&
t
,
std
::
string
*
str
);
template
<
typename
T
>
...
...
paddle/fluid/framework/io/shell.cc
浏览文件 @
a0b59773
...
...
@@ -197,7 +197,7 @@ std::shared_ptr<FILE> shell_popen(const std::string& cmd,
static
int
shell_p2open_fork_internal
(
const
char
*
real_cmd
,
int
pipein_fds
[
2
],
int
pipeout_fds
[
2
])
{
#ifndef
#ifndef
_WIN32
int
child_pid
=
-
1
;
if
((
child_pid
=
fork
())
<
0
)
{
return
-
1
;
...
...
paddle/fluid/framework/io/shell.h
浏览文件 @
a0b59773
...
...
@@ -16,7 +16,11 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/syscall.h>
#endif
#include <sys/types.h>
#include <sys/wait.h>
#include <memory>
...
...
paddle/fluid/platform/lodtensor_printer_test.cc
浏览文件 @
a0b59773
...
...
@@ -18,7 +18,7 @@
TEST
(
LodTensorPrinter
,
PrintVar
)
{
paddle
::
framework
::
Scope
scope
;
PrintVar
(
&
scope
,
"NotAVar"
,
"We don't have var"
);
paddle
::
platform
::
PrintVar
(
&
scope
,
"NotAVar"
,
"We don't have var"
);
paddle
::
framework
::
Variable
*
v
=
scope
.
Var
(
"NotAVar"
);
PrintVar
(
&
scope
,
"NotAVar"
,
"Now we have a var"
);
paddle
::
platform
::
PrintVar
(
&
scope
,
"NotAVar"
,
"Now we have a var"
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录