Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
ce238f10
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
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看板
提交
ce238f10
编写于
9月 18, 2020
作者:
C
chengmo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
299fb8a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
14 deletion
+22
-14
paddle/fluid/operators/distributed/parameter_prefetch.cc
paddle/fluid/operators/distributed/parameter_prefetch.cc
+4
-2
paddle/fluid/operators/distributed/parameter_recv.cc
paddle/fluid/operators/distributed/parameter_recv.cc
+4
-4
paddle/fluid/operators/distributed/parameter_send.cc
paddle/fluid/operators/distributed/parameter_send.cc
+4
-6
paddle/fluid/platform/device_tracer.cc
paddle/fluid/platform/device_tracer.cc
+10
-2
未找到文件。
paddle/fluid/operators/distributed/parameter_prefetch.cc
浏览文件 @
ce238f10
...
...
@@ -195,8 +195,8 @@ void prefetchs(const std::vector<std::string> &id_var_names,
const
std
::
vector
<
std
::
string
>
&
endpoints
,
const
framework
::
ExecutionContext
&
context
,
const
framework
::
Scope
&
scope
)
{
platform
::
RecordEvent
record_e
vent
(
"Distributed_lookup_table::prefetchs"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
PushE
vent
(
"Distributed_lookup_table::prefetchs"
,
platform
::
EventRole
::
kInnerOp
);
auto
vec_dim_1
=
0
;
auto
vec_dim_0
=
0
;
framework
::
Variable
*
var
=
scope
.
FindVar
(
persistable_var_name
);
...
...
@@ -304,6 +304,8 @@ void prefetchs(const std::vector<std::string> &id_var_names,
#endif
}
}
platform
::
PopEvent
(
"Distributed_lookup_table::prefetchs"
,
platform
::
EventRole
::
kInnerOp
);
}
};
// namespace distributed
...
...
paddle/fluid/operators/distributed/parameter_recv.cc
浏览文件 @
ce238f10
...
...
@@ -43,8 +43,8 @@ using DDim = framework::DDim;
template
<
typename
T
>
void
RecvSelectedRows
(
const
CommContext
&
rpc_ctx
,
const
framework
::
Scope
&
scope
)
{
platform
::
RecordEvent
record_event
(
"ParameterRecv::RecvSelectedRows"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
RecordEvent
record_event
_grpc
(
"ParameterRecv::RecvSelectedRows"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
DeviceContextPool
&
pool
=
platform
::
DeviceContextPool
::
Instance
();
auto
cpu_place
=
platform
::
CPUPlace
();
auto
&
cpu_ctx
=
*
pool
.
Get
(
cpu_place
);
...
...
@@ -114,8 +114,8 @@ void RecvSelectedRows(const CommContext &rpc_ctx,
template
<
typename
T
>
void
RecvLodTensor
(
const
CommContext
&
rpc_ctx
,
const
framework
::
Scope
&
scope
)
{
platform
::
RecordEvent
record_event
(
"ParameterRecv::RecvLodTensor"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
RecordEvent
record_event
_grpc
(
"ParameterRecv::RecvLodTensor"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
DeviceContextPool
&
pool
=
platform
::
DeviceContextPool
::
Instance
();
auto
cpu_place
=
platform
::
CPUPlace
();
auto
&
cpu_ctx
=
*
pool
.
Get
(
cpu_place
);
...
...
paddle/fluid/operators/distributed/parameter_send.cc
浏览文件 @
ce238f10
...
...
@@ -98,8 +98,6 @@ template <typename T>
void
ParameterSend
<
T
>::
operator
()(
const
CommContext
&
rpc_ctx
,
const
framework
::
Scope
&
scope
,
bool
sync
,
int
multi_parts
)
{
platform
::
RecordEvent
record_event
(
"ParameterSend::operator"
,
platform
::
EventRole
::
kInnerOp
);
if
(
rpc_ctx
.
var_name
==
STEP_COUNTER
)
{
SendByNotifyRPC
(
rpc_ctx
,
scope
);
return
;
...
...
@@ -117,8 +115,8 @@ void ParameterSend<T>::operator()(const CommContext &rpc_ctx,
auto
*
send_var
=
scope
.
FindVar
(
rpc_ctx
.
var_name
);
if
(
send_var
->
IsType
<
framework
::
LoDTensor
>
())
{
platform
::
RecordEvent
record_event
(
"ParameterSend::LoDTensor"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
RecordEvent
record_event
_grpc
(
"ParameterSend::LoDTensor"
,
platform
::
EventRole
::
kInnerOp
);
size_t
out_num
=
rpc_ctx
.
splited_varnames
.
size
();
if
(
out_num
>
1
)
{
auto
&
send_tensor
=
send_var
->
Get
<
framework
::
LoDTensor
>
();
...
...
@@ -167,8 +165,8 @@ void ParameterSend<T>::operator()(const CommContext &rpc_ctx,
}
}
}
else
if
(
send_var
->
IsType
<
framework
::
SelectedRows
>
())
{
platform
::
RecordEvent
record_event
(
"ParameterSend::SelectedRows"
,
platform
::
EventRole
::
kInnerOp
);
platform
::
RecordEvent
record_event
_grpc
(
"ParameterSend::SelectedRows"
,
platform
::
EventRole
::
kInnerOp
);
auto
&
send_slr
=
send_var
->
Get
<
framework
::
SelectedRows
>
();
auto
&
send_rows
=
send_slr
.
rows
();
...
...
paddle/fluid/platform/device_tracer.cc
浏览文件 @
ce238f10
...
...
@@ -694,8 +694,16 @@ Event *CurAnnotation() {
return
annotation_stack
.
back
();
}
std
::
string
CurAnnotationName
()
{
if
(
annotation_stack
.
empty
())
return
"Unknown"
;
return
annotation_stack
.
back
()
->
name
();
std
::
string
curr_annotation_name
=
"Unknown"
;
try
{
if
(
annotation_stack
.
empty
())
{
return
curr_annotation_name
;
}
return
annotation_stack
.
back
()
->
name
();
}
catch
(...)
{
VLOG
(
1
)
<<
"CurAnnotationName Failed"
;
}
return
curr_annotation_name
;
}
void
SetCurBlock
(
int
block_id
)
{
block_id_stack
.
push_back
(
block_id
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录