From 8a115afbff2216ffabf013a1454d7f0be68b4c18 Mon Sep 17 00:00:00 2001 From: wuyulong11 Date: Fri, 22 Sep 2023 16:17:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=91=20=E3=80=90issue=20I82Q02=E3=80=91=E3=80=90tbplugin?= =?UTF-8?q?=E3=80=91=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88=E6=9C=ACmsprof?= =?UTF-8?q?=E9=87=87=E9=9B=86=E6=95=B0=E6=8D=AEtrace=5Fview.json=E4=B8=ADt?= =?UTF-8?q?s=E5=AD=97=E6=AE=B5=E4=B8=BA=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=83=85=E5=86=B5=20=E3=80=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=E3=80=91=20wuyulong=2030031080?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tb_plugin/torch_tb_profiler/profiler/data.py | 2 +- .../tb_plugin/torch_tb_profiler/profiler/loader.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/data.py b/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/data.py index b3d402b25e..2823d2b6bd 100644 --- a/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/data.py +++ b/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/data.py @@ -235,7 +235,7 @@ class RunProfileData(object): start_ts = float('inf') for i in reversed(range(len(event_list))): if event_list[i].get('ts') is not None: - start_ts = min(start_ts, event_list[i]['ts']) + start_ts = min(start_ts, float(event_list[i]['ts'])) if device_target != 'Ascend': if event_list[i]['name'] == 'Record Window End': end_index = i diff --git a/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/loader.py b/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/loader.py index ce615c827f..1166abed6c 100644 --- a/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/loader.py +++ b/plugins/tensorboard-plugins/tb_plugin/torch_tb_profiler/profiler/loader.py @@ -52,7 +52,7 @@ class RunLoader(object): data_path = io.join(self.run_dir, path, 'ASCEND_PROFILER_OUTPUT') for file in io.listdir(data_path): if utils.is_npu_trace_path(file) or str(file) in ( - 'kernel_details.csv', 'memory_record.csv', 'memory_record.csv', + 'kernel_details.csv', 'memory_record.csv', 'operator_memory.csv', 'operator_details.csv'): match = consts.WORKER_SPAN_PATTERN.match(path) worker = match.group(1) -- Gitee