Skip to content

[V1] fix torch profiling for V1 offline scenarios - #18445

Merged
DarkLight1337 merged 3 commits into
vllm-project:mainfrom
divakar-amd:v1_torchProfiler
May 28, 2025
Merged

[V1] fix torch profiling for V1 offline scenarios#18445
DarkLight1337 merged 3 commits into
vllm-project:mainfrom
divakar-amd:v1_torchProfiler

Conversation

@divakar-amd

@divakar-amd divakar-amd commented May 21, 2025

Copy link
Copy Markdown
Contributor

Currently, the torch profiler doesn't capture anything useful for V1 offline benchmarking scenarios as the gpu_worker is attached to a different process.  This PR:

  1. Refactors offline benchmarking scripts to capture profiler information for both V0 & V1 mode.
  2. Dumps kernels summary table automatically when the profiler is stopped.
  • The PR replaces --profile-result-dir and checks if the VLLM_TORCH_PROFILER_DIR environment variable is set before enabling profiling

Signed-off-by: Divakar Verma <divakar.verma@amd.com>
@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify Bot added the v1 label May 21, 2025
Signed-off-by: Divakar Verma <divakar.verma@amd.com>

@youkaichao youkaichao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@DarkLight1337

Copy link
Copy Markdown
Member

Can you merge from main to fix CI?

@DarkLight1337
DarkLight1337 enabled auto-merge (squash) May 27, 2025 15:51
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label May 27, 2025
@divakar-amd

Copy link
Copy Markdown
Contributor Author

Can you merge from main to fix CI?

@DarkLight1337 Hi, anything else required here?

@DarkLight1337

Copy link
Copy Markdown
Member

Docker build previously failed, retrying now

@DarkLight1337
DarkLight1337 merged commit 774c5fd into vllm-project:main May 28, 2025
amitm02 pushed a commit to amitm02/vllm that referenced this pull request Jun 1, 2025
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
Signed-off-by: amit <amit.man@gmail.com>
@ProExpertProg

Copy link
Copy Markdown
Collaborator

Why remove the default profile dir? IMO the default worked fine, and we should restore it so VLLM_TORCH_PROFILER_DIR doesn't need to be specified manually every time

0826joyce pushed a commit to 0826joyce/vllm-serving-optimization that referenced this pull request May 19, 2026
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
philippesic pushed a commit to philippesic/vllm-semantic-cache that referenced this pull request Jul 19, 2026
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
plasticchris pushed a commit to plasticchris/vllm that referenced this pull request Jul 20, 2026
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants