Skip to content

[0.13.0][Profiler] Fix profiler bug#6383

Merged
wangxiyuan merged 1 commit intovllm-project:releases/v0.13.0from
wangxiyuan:fix_profiler
Jan 29, 2026
Merged

[0.13.0][Profiler] Fix profiler bug#6383
wangxiyuan merged 1 commit intovllm-project:releases/v0.13.0from
wangxiyuan:fix_profiler

Conversation

@wangxiyuan
Copy link
Copy Markdown
Collaborator

@wangxiyuan wangxiyuan commented Jan 29, 2026

Pick from #6141 to make profiler work as expect.

This PR also make sure VLLM_TORCH_PROFILER_WITH_STACK and VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY work as the same behaviour with v0.12.0

@wangxiyuan wangxiyuan changed the title [Profiler] Fix profiler bug [0.13.0][Profiler] Fix profiler bug Jan 29, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request appears to fix a bug in the profiler by changing some of its configuration parameters. Specifically, it enables data_simplification, disables with_stack, and repurposes the VLLM_TORCH_PROFILER_WITH_STACK environment variable to control with_modules. While disabling with_stack is likely the intended bug fix, repurposing an environment variable with a now-misleading name is a concern for maintainability and user experience. I've left a comment with a suggestion to improve this.

Comment thread vllm_ascend/worker/worker.py Outdated
Comment on lines +520 to +523
with_stack=False,
profile_memory=envs_vllm.\
VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY,
with_modules=False,
with_modules=bool(envs_vllm.VLLM_TORCH_PROFILER_WITH_STACK),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While hardcoding with_stack=False seems to address a bug, repurposing the VLLM_TORCH_PROFILER_WITH_STACK environment variable to control with_modules is confusing for users and harms maintainability. The variable name no longer matches its behavior, which is a breaking change in functionality for users of this flag.

To improve clarity, it would be better to introduce a new, descriptively named environment variable (e.g., VLLM_TORCH_PROFILER_WITH_MODULES) for this purpose. If that's not feasible, at least a comment explaining this change is crucial to avoid future confusion.

Copy link
Copy Markdown
Collaborator

@linfeng-yuan linfeng-yuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Maybe envs_vllm.VLLM_TORCH_PROFILER_WITH_STACK is a string;
  2. change profile_memory=envs_vllm.
    VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY, also

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
@wangxiyuan wangxiyuan merged commit 327a9f6 into vllm-project:releases/v0.13.0 Jan 29, 2026
13 checks passed
starmountain1997 pushed a commit to starmountain1997/vllm-ascend that referenced this pull request Jan 31, 2026
Pick from vllm-project#6141 to make profiler work as expect.

This PR also make sure `VLLM_TORCH_PROFILER_WITH_STACK` and
`VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY` work as the same behaviour
with v0.12.0

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
@wangxiyuan wangxiyuan deleted the fix_profiler branch February 3, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants