From 548f2f0b314b743940645897f157b214970d75c5 Mon Sep 17 00:00:00 2001 From: zhouxianqi <13165993773@163.com> Date: Mon, 19 May 2025 14:09:31 +0800 Subject: [PATCH] fix_step --- .../compare_backend/profiling_parser/base_profiling_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiler/msprof_analyze/compare_tools/compare_backend/profiling_parser/base_profiling_parser.py b/profiler/msprof_analyze/compare_tools/compare_backend/profiling_parser/base_profiling_parser.py index fa24a844c..bb7dfe7d9 100644 --- a/profiler/msprof_analyze/compare_tools/compare_backend/profiling_parser/base_profiling_parser.py +++ b/profiler/msprof_analyze/compare_tools/compare_backend/profiling_parser/base_profiling_parser.py @@ -124,7 +124,8 @@ class BaseProfilingParser(ABC): if self._step_id == Constant.VOID_STEP: return self._step_range step_list = [] - for event in self._result_data.torch_op_data: + events = self._result_data.torch_op_data or self._trace_event_generator(self._profiling_type) + for event in events: if event.is_step_profiler(): step_id = event.name.split("#")[-1] step_list.append(step_id) -- Gitee