Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
419b7f8a
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
419b7f8a
编写于
6月 28, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
6月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
!389 Modify the time unit of aicpu profiling data
Merge pull request !389 from 治愈系潇洒哥/master
上级
d5f54f62
271aa093
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
11 deletion
+13
-11
mindinsight/profiler/parser/aicpu_data_parser.py
mindinsight/profiler/parser/aicpu_data_parser.py
+8
-6
tests/utils/resource/JOB_AICPU/expect/output_data_preprocess_aicpu_0.txt
...ource/JOB_AICPU/expect/output_data_preprocess_aicpu_0.txt
+5
-5
未找到文件。
mindinsight/profiler/parser/aicpu_data_parser.py
浏览文件 @
419b7f8a
...
...
@@ -35,8 +35,9 @@ class DataPreProcessParser:
_source_file_target
=
'DATA_PREPROCESS.dev.AICPU.'
_dst_file_title
=
'title:DATA_PREPROCESS AICPU'
_dst_file_column_title
=
[
'serial_number'
,
'node_type_name'
,
'total_time(us)'
,
'dispatch_time(us)'
,
'run_start'
,
'run_end'
]
_dst_file_column_title
=
[
'serial_number'
,
'node_type_name'
,
'total_time(ms)'
,
'dispatch_time(ms)'
,
'run_start'
,
'run_end'
]
_ms_unit
=
1000
def
__init__
(
self
,
input_path
,
output_filename
):
self
.
_input_path
=
input_path
...
...
@@ -71,8 +72,8 @@ class DataPreProcessParser:
run_start
=
node_list
[
1
].
split
(
':'
)[
-
1
].
split
(
' '
)[
0
]
run_end
=
node_list
[
run_end_index
].
split
(
':'
)[
-
1
].
split
(
' '
)[
0
]
total_time
=
thread_list
[
-
1
].
split
(
'='
)[
-
1
].
split
()[
0
]
dispatch_time
=
thread_list
[
-
2
].
split
(
'='
)[
-
1
].
split
()[
0
]
total_time
=
float
(
thread_list
[
-
1
].
split
(
'='
)[
-
1
].
split
()[
0
])
/
self
.
_ms_unit
dispatch_time
=
float
(
thread_list
[
-
2
].
split
(
'='
)[
-
1
].
split
()[
0
])
/
self
.
_ms_unit
return
[
number
,
node_type_name
,
total_time
,
dispatch_time
,
run_start
,
run_end
]
...
...
@@ -112,7 +113,7 @@ class DataPreProcessParser:
result_list
.
append
(
result
)
# Calculate the total time.
total_time
=
result
[
2
]
ai_cpu_total_time_summary
+=
int
(
total_time
)
ai_cpu_total_time_summary
+=
total_time
# Increase node serial number.
serial_number
+=
1
elif
"Node"
in
node_line
and
"Thread"
not
in
thread_line
:
...
...
@@ -120,7 +121,8 @@ class DataPreProcessParser:
logger
.
warning
(
"The node type:%s cannot find thread data"
,
node_type_name
)
if
result_list
:
result_list
.
append
([
"AI CPU Total Time(us):"
,
ai_cpu_total_time_summary
])
ai_cpu_total_time
=
format
(
ai_cpu_total_time_summary
,
'.6f'
)
result_list
.
append
([
"AI CPU Total Time(ms):"
,
ai_cpu_total_time
])
fwrite_format
(
self
.
_output_filename
,
data_source
=
self
.
_dst_file_title
,
is_print
=
True
,
is_start
=
True
)
fwrite_format
(
self
.
_output_filename
,
...
...
tests/utils/resource/JOB_AICPU/expect/output_data_preprocess_aicpu_0.txt
浏览文件 @
419b7f8a
serial_number node_type_name total_time(
us) dispatch_time(u
s) run_start run_end
serial_number node_type_name total_time(
ms) dispatch_time(m
s) run_start run_end
---------------------- ---------------- ---------------- ------------------- ----------- ----------
1 InitData
1567 100
2298200409 2298200538
2 GetNext
989
87 2302769932 2302769980
3 TruncatedNormal
1566
105 4098200409 4098200538
AI CPU Total Time(
us): 4122
1 InitData
1.567 0.1
2298200409 2298200538
2 GetNext
0.989 0.0
87 2302769932 2302769980
3 TruncatedNormal
1.566 0.
105 4098200409 4098200538
AI CPU Total Time(
ms): 4.122000
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录