From 4b5e46cee05f6d24ae22cbfbd79a03d304949074 Mon Sep 17 00:00:00 2001 From: jiangmianjiao Date: Thu, 20 Apr 2023 16:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=91=20Duration=E7=9A=84=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=20=E3=80=90=E4=BF=AE=E6=94=B9=E4=BA=BA=E3=80=91=20jiangmianjia?= =?UTF-8?q?o=2030036454?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tb_plugin/torch_tb_profiler/profiler/run_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py index 958f8ce354a..e32f556503d 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py @@ -434,9 +434,9 @@ class RunGenerator(object): temp = self.statistic_data[call_name] temp['Max'] = max(temp['Max'], call_duration) temp['Min'] = min(temp['Min'], call_duration) - temp['Total'] += call_duration + temp['Total'] = round(temp['Total'] + call_duration, 2) temp['Calls'] += 1 - temp['Average'] = temp['Total'] / temp['Calls'] + temp['Average'] = round(temp['Total'] / temp['Calls'], 2) else: self.statistic_data[call_name] = { 'Calls': 1, -- Gitee