[NPU] fix profiler on npu (#24685)
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
This commit is contained in:
@@ -201,6 +201,21 @@ class SchedulerProfilerMixin:
|
||||
str(self.torch_profiler_output_dir)
|
||||
)
|
||||
),
|
||||
experimental_config=(
|
||||
None
|
||||
if not _is_npu
|
||||
else torch_npu.profiler._ExperimentalConfig(
|
||||
export_type=torch_npu.profiler.ExportType.Text,
|
||||
profiler_level=torch_npu.profiler.ProfilerLevel.Level1,
|
||||
msprof_tx=False,
|
||||
aic_metrics=torch_npu.profiler.AiCMetrics.AiCoreNone,
|
||||
l2_cache=False,
|
||||
op_attr=False,
|
||||
data_simplification=False,
|
||||
record_op_args=False,
|
||||
gc_detect_threshold=None,
|
||||
)
|
||||
),
|
||||
)
|
||||
self.torch_profiler.start()
|
||||
self.profile_in_progress = True
|
||||
|
||||
Reference in New Issue
Block a user