Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
963163e6
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看板
未验证
提交
963163e6
编写于
7月 26, 2022
作者:
C
chenjian
提交者:
GitHub
7月 26, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix record event for operator type in new dygraph (#44582)
* fix new dygraph record event for op * update unit test
上级
9b662bef
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
17 deletion
+18
-17
paddle/fluid/eager/auto_code_generator/eager_generator.cc
paddle/fluid/eager/auto_code_generator/eager_generator.cc
+1
-1
paddle/fluid/eager/auto_code_generator/final_state_generator/python_c_gen.py
...auto_code_generator/final_state_generator/python_c_gen.py
+1
-1
paddle/fluid/eager/backward.cc
paddle/fluid/eager/backward.cc
+1
-1
paddle/fluid/platform/profiler/chrometracing_logger.cc
paddle/fluid/platform/profiler/chrometracing_logger.cc
+2
-2
python/paddle/fluid/tests/unittests/test_profiler_statistic.py
...n/paddle/fluid/tests/unittests/test_profiler_statistic.py
+11
-11
python/paddle/profiler/profiler_statistic.py
python/paddle/profiler/profiler_statistic.py
+2
-1
未找到文件。
paddle/fluid/eager/auto_code_generator/eager_generator.cc
浏览文件 @
963163e6
...
...
@@ -1386,7 +1386,7 @@ static std::string GenerateGradNodeCreationContent(
"%s"
" {
\n
"
" paddle::platform::RecordEvent node_creation_record_event(
\"
%s
\"
, "
"paddle::platform::TracerEventType::Operator, 1);
\n
"
"paddle::platform::TracerEventType::Operator
Inner
, 1);
\n
"
"%s"
" if(require_any_grad) {
\n
"
" VLOG(6) <<
\"
Construct Grad for %s
\"
;
\n
"
...
...
paddle/fluid/eager/auto_code_generator/final_state_generator/python_c_gen.py
浏览文件 @
963163e6
...
...
@@ -111,7 +111,7 @@ PARSE_PYTHON_C_ARGS_TEMPLATE = \
RECORD_EVENT_TEMPLATE
=
\
"paddle::platform::RecordEvent {}(
\"
{} {}
\"
, paddle::platform::TracerEventType::
Operator
, 1);"
"paddle::platform::RecordEvent {}(
\"
{} {}
\"
, paddle::platform::TracerEventType::
UserDefined
, 1);"
RETURN_INPLACE_PYOBJECT_TEMPLATE
=
\
...
...
paddle/fluid/eager/backward.cc
浏览文件 @
963163e6
...
...
@@ -851,7 +851,7 @@ void Backward(
bool
retain_graph
)
{
VLOG
(
3
)
<<
"Run in Backward"
;
paddle
::
platform
::
RecordEvent
backward_record_event
(
"backward"
,
paddle
::
platform
::
TracerEventType
::
Operator
,
1
);
"backward"
,
paddle
::
platform
::
TracerEventType
::
UserDefined
,
1
);
RunBackward
(
tensors
,
grad_tensors
,
retain_graph
);
phi
::
autotune
::
AutoTuneStatus
::
Instance
().
Update
();
}
...
...
paddle/fluid/platform/profiler/chrometracing_logger.cc
浏览文件 @
963163e6
...
...
@@ -603,7 +603,7 @@ void ChromeTracingLogger::StartLog() {
std
::
string
(
R"JSON(
{
"id": %d, "name": "%s", "totalGlobalMem": %u,
"id": %d, "name": "%s", "totalGlobalMem": %
ll
u,
"computeMajor": %d, "computeMinor": %d,
"maxThreadsPerBlock": %d, "maxThreadsPerMultiprocessor": %d,
"regsPerBlock": %d, "regsPerMultiprocessor": %d, "warpSize": %d,
...
...
@@ -633,7 +633,7 @@ void ChromeTracingLogger::StartLog() {
std
::
string
(
R"JSON(
{
"id": %d, "name": "%s", "totalGlobalMem": %u,
"id": %d, "name": "%s", "totalGlobalMem": %
ll
u,
"computeMajor": %d, "computeMinor": %d,
"maxThreadsPerBlock": %d, "maxThreadsPerMultiprocessor": %d,
"regsPerBlock": %d, "regsPerMultiprocessor": %d, "warpSize": %d,
...
...
python/paddle/fluid/tests/unittests/test_profiler_statistic.py
浏览文件 @
963163e6
...
...
@@ -82,9 +82,9 @@ class TestProfilerStatistic(unittest.TestCase):
profiler
.
TracerEventType
.
Forward
,
50
,
110
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
UserDefined
,
100
,
110
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
Python
UserDefined
,
100
,
110
,
1000
,
1001
)
communication_node
=
HostPythonNode
(
'Communication'
,
profiler
.
TracerEventType
.
Communication
,
105
,
110
,
...
...
@@ -209,7 +209,7 @@ class TestProfilerStatistic(unittest.TestCase):
0
,
profiler
.
TracerEventType
.
Memcpy
),
60
)
self
.
assertEqual
(
time_range_summary
.
get_cpu_range_sum
(
profiler
.
TracerEventType
.
UserDefined
),
2
5
)
profiler
.
TracerEventType
.
UserDefined
),
1
5
)
self
.
assertEqual
(
time_range_summary
.
get_cpu_range_sum
(
profiler
.
TracerEventType
.
Communication
),
5
)
...
...
@@ -277,9 +277,9 @@ class TestProfilerStatistic(unittest.TestCase):
profiler
.
TracerEventType
.
Forward
,
50
,
110
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
UserDefined
,
100
,
110
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
Python
UserDefined
,
100
,
110
,
1000
,
1001
)
allreduce_launchkernel0
=
HostPythonNode
(
'cudalaunchkernel'
,
profiler
.
TracerEventType
.
CudaRuntime
,
102
,
104
,
1000
,
1001
)
...
...
@@ -451,7 +451,7 @@ class TestProfilerStatistic(unittest.TestCase):
0
,
profiler
.
TracerEventType
.
Memcpy
),
60
)
self
.
assertEqual
(
time_range_summary
.
get_cpu_range_sum
(
profiler
.
TracerEventType
.
UserDefined
),
2
5
)
profiler
.
TracerEventType
.
UserDefined
),
1
5
)
self
.
assertEqual
(
time_range_summary
.
get_cpu_range_sum
(
profiler
.
TracerEventType
.
Communication
),
5
)
...
...
@@ -518,9 +518,9 @@ class TestProfilerStatistic(unittest.TestCase):
optimization_node
=
HostPythonNode
(
'Optimization'
,
profiler
.
TracerEventType
.
Optimization
,
220
,
300
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
UserDefined
,
60
,
70
,
1000
,
1001
)
userdefined_node
=
HostPythonNode
(
'Communication Time'
,
profiler
.
TracerEventType
.
Python
UserDefined
,
60
,
70
,
1000
,
1001
)
conv2d_node
=
HostPythonNode
(
'conv2d'
,
profiler
.
TracerEventType
.
Operator
,
25
,
25
,
...
...
python/paddle/profiler/profiler_statistic.py
浏览文件 @
963163e6
...
...
@@ -514,7 +514,8 @@ class EventSummary:
or
'memset'
in
host_statistic_node
.
name
.
lower
():
self
.
add_memory_manipulation_item
(
host_statistic_node
)
else
:
self
.
add_userdefined_item
(
host_statistic_node
)
if
host_statistic_node
.
type
==
TracerEventType
.
PythonUserDefined
:
self
.
add_userdefined_item
(
host_statistic_node
)
self
.
add_kernel_item
(
host_statistic_nodes
[
0
])
for
threadid
,
root_statistic_node
in
node_statistic_trees
.
items
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录