From 8f5df4f32561a9b96e0a32bc84b21711d49afb41 Mon Sep 17 00:00:00 2001 From: gzhcv Date: Wed, 9 Sep 2020 21:56:28 +0800 Subject: [PATCH] gpu_timeline(python code) update mindspore/profiler/parser/integrator.py. update mindspore/profiler/profiling.py. --- mindspore/profiler/parser/integrator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/profiler/parser/integrator.py b/mindspore/profiler/parser/integrator.py index 02f0b71901..584ba3181a 100644 --- a/mindspore/profiler/parser/integrator.py +++ b/mindspore/profiler/parser/integrator.py @@ -490,8 +490,6 @@ class BaseTimelineGenerator: __col_names__ = ['op_name', 'stream_id', 'start_time', 'duration'] _output_timeline_data_file_path = 'output_timeline_data_{}.txt' _min_cycle_counter_file_path = 'min_cycle_counter_{}.txt' - _display_filename = 'timeline_display_{}.json' - _timeline_summary_filename = 'timeline_summary_{}.json' _timeline_meta = [] _timeline_summary = { 'total_time': 0, @@ -680,7 +678,7 @@ class GpuTimelineGenerator(BaseTimelineGenerator): timeline_dict['args'] = args_dict else: # Update total time of operator execution. - self._timeline_summary['total_time'] += dur + self._timeline_summary['total_time'] += dur / factor self._timeline_summary['op_exe_times'] += 1 self._timeline_meta.append(timeline_dict) @@ -770,6 +768,8 @@ class GpuTimelineGenerator(BaseTimelineGenerator): class AscendTimelineGenerator(BaseTimelineGenerator): """Generate ascend Timeline data from file.""" + _display_filename = 'ascend_timeline_display_{}.json' + _timeline_summary_filename = 'ascend_timeline_summary_{}.json' def _load_timeline_data(self): """Load timeline data from file."""