Skip to content

Commit 9a4eb94

Browse files
authored
[Misc] Adjust the default profiler configuration (#1097)
### What this PR does / why we need it? When profiling, it is often necessary to disable the call stack to reduce profiling overhead, and adjust the profiler_level to level1 to obtain more detailed operator and communication information. Therefore, it is recommended to modify the default profiling configuration. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? No Signed-off-by: ApsarasX <apsarax@outlook.com>
1 parent 5d0e9fd commit 9a4eb94

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

vllm_ascend/worker/worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self,
140140

141141
experimental_config = torch_npu.profiler._ExperimentalConfig(
142142
export_type=torch_npu.profiler.ExportType.Text,
143-
profiler_level=torch_npu.profiler.ProfilerLevel.Level0,
143+
profiler_level=torch_npu.profiler.ProfilerLevel.Level1,
144144
msprof_tx=False,
145145
aic_metrics=torch_npu.profiler.AiCMetrics.AiCoreNone,
146146
l2_cache=False,
@@ -155,9 +155,9 @@ def __init__(self,
155155
torch_npu.profiler.ProfilerActivity.CPU,
156156
torch_npu.profiler.ProfilerActivity.NPU,
157157
],
158-
with_stack=True,
159-
profile_memory=True,
160-
with_modules=True,
158+
with_stack=False,
159+
profile_memory=False,
160+
with_modules=False,
161161
experimental_config=experimental_config,
162162
on_trace_ready=torch_npu.profiler.tensorboard_trace_handler(
163163
torch_profiler_trace_dir))

vllm_ascend/worker/worker_v1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _init_profiler(self):
275275

276276
experimental_config = torch_npu.profiler._ExperimentalConfig(
277277
export_type=torch_npu.profiler.ExportType.Text,
278-
profiler_level=torch_npu.profiler.ProfilerLevel.Level0,
278+
profiler_level=torch_npu.profiler.ProfilerLevel.Level1,
279279
msprof_tx=False,
280280
aic_metrics=torch_npu.profiler.AiCMetrics.AiCoreNone,
281281
l2_cache=False,
@@ -290,9 +290,9 @@ def _init_profiler(self):
290290
torch_npu.profiler.ProfilerActivity.CPU,
291291
torch_npu.profiler.ProfilerActivity.NPU,
292292
],
293-
with_stack=True,
294-
profile_memory=True,
295-
with_modules=True,
293+
with_stack=False,
294+
profile_memory=False,
295+
with_modules=False,
296296
experimental_config=experimental_config,
297297
on_trace_ready=torch_npu.profiler.tensorboard_trace_handler(
298298
torch_profiler_trace_dir))

0 commit comments

Comments
 (0)