提交 88ea0553 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!410 profiler: fixed the issues of timeline AllReduce info display

Merge pull request !410 from zhangyunshu/zys_timeline_fixed_allreduce
......@@ -83,7 +83,7 @@ class StepTraceAnalyser(BaseAnalyser):
row_info_dict = self._get_info_dict_from_row_data(row_info, 'systime')
reduce_info = self._sort_reduce_by_time(row_info_dict)
if reduce_info:
reduce_infos.append(reduce_info)
reduce_infos.extend(reduce_info)
return reduce_infos
......@@ -282,8 +282,9 @@ class StepTraceAnalyser(BaseAnalyser):
log.info("Reduce event missing value.")
continue
cur_stream_id = reduce_field.split('_', 2)[1]
reduce_info = [reduce_field, int(cur_stream_id), reduce_start,
reduce_meta = [reduce_field, int(cur_stream_id), reduce_start,
reduce_duration, reduce_pid]
reduce_info.append(reduce_meta)
return reduce_info
......
......@@ -236,6 +236,12 @@ class Profiler:
def _analyse_timeline(self, aicpu_parser, optime_parser):
"""
Analyse and parse timeline info.
Args:
aicpu_parser (DataPreProcessParser): The parser instance for AI CPU operator
execution time calculation.
optime_parser (OPComputeTimeParserParser): The parser instance for AI Core
operator execution time calculation.
"""
timeline_analyser = AnalyserFactory.instance().get_analyser(
'timeline', self._output_path, self._dev_id
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册