Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
5574c8cf
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看板
未验证
提交
5574c8cf
编写于
9月 21, 2021
作者:
W
wanghuancoder
提交者:
GitHub
9月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add timeline(recordevent) for new executor, test=develop (#35831)
上级
fab1a029
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
5 deletion
+13
-5
paddle/fluid/framework/new_executor/interpretercore.cc
paddle/fluid/framework/new_executor/interpretercore.cc
+13
-5
未找到文件。
paddle/fluid/framework/new_executor/interpretercore.cc
浏览文件 @
5574c8cf
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <unordered_set>
#include <unordered_set>
#include "paddle/fluid/framework/details/share_tensor_buffer_functor.h"
#include "paddle/fluid/framework/details/share_tensor_buffer_functor.h"
#include "paddle/fluid/platform/profiler.h"
PADDLE_DEFINE_EXPORTED_bool
(
new_executor_use_inplace
,
true
,
PADDLE_DEFINE_EXPORTED_bool
(
new_executor_use_inplace
,
true
,
"Use inplace in new executor"
);
"Use inplace in new executor"
);
...
@@ -304,9 +305,12 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
...
@@ -304,9 +305,12 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
VLOG
(
3
)
<<
"RunInstruction: "
VLOG
(
3
)
<<
"RunInstruction: "
<<
instr_node
.
kernel_func_
.
operator_base_
->
Type
();
<<
instr_node
.
kernel_func_
.
operator_base_
->
Type
();
{
platform
::
RecordEvent
infershape_event
(
"InferShape"
);
static_cast
<
const
framework
::
OperatorWithKernel
*>
(
static_cast
<
const
framework
::
OperatorWithKernel
*>
(
instr_node
.
kernel_func_
.
operator_base_
)
instr_node
.
kernel_func_
.
operator_base_
)
->
InferShape
(
instr_node
.
infershape_ctx_
.
get
());
->
InferShape
(
instr_node
.
infershape_ctx_
.
get
());
}
if
(
FLAGS_new_executor_use_inplace
)
{
if
(
FLAGS_new_executor_use_inplace
)
{
for
(
auto
&
pair
:
instr_node
.
vec_inplace_in_to_out_
)
{
for
(
auto
&
pair
:
instr_node
.
vec_inplace_in_to_out_
)
{
...
@@ -318,8 +322,10 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
...
@@ -318,8 +322,10 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
}
}
}
}
}
}
{
platform
::
RecordEvent
compute_event
(
"Compute"
);
instr_node
.
kernel_func_
.
compute_func_
(
*
instr_node
.
execution_ctx_
.
get
());
instr_node
.
kernel_func_
.
compute_func_
(
*
instr_node
.
execution_ctx_
.
get
());
}
}
}
void
InterpreterCore
::
ExecuteInstructionList
(
void
InterpreterCore
::
ExecuteInstructionList
(
...
@@ -350,6 +356,8 @@ void InterpreterCore::RunInstructionAsync(size_t instr_id,
...
@@ -350,6 +356,8 @@ void InterpreterCore::RunInstructionAsync(size_t instr_id,
AtomicVectorSizeT
*
atomic_var_ref
,
AtomicVectorSizeT
*
atomic_var_ref
,
std
::
atomic
<
size_t
>*
op_run_number
)
{
std
::
atomic
<
size_t
>*
op_run_number
)
{
auto
&
instr_node
=
vec_instruction_
[
instr_id
];
auto
&
instr_node
=
vec_instruction_
[
instr_id
];
platform
::
RecordEvent
instruction_event
(
instr_node
.
kernel_func_
.
operator_base_
->
Type
());
event_manager_
.
WaitEvent
(
instr_node
,
place_
);
event_manager_
.
WaitEvent
(
instr_node
,
place_
);
RunInstruction
(
instr_node
);
RunInstruction
(
instr_node
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录