Skip to content

Expose PyTorch profiler configuration to environment variables #21803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2025

Conversation

Csrayz
Copy link
Contributor

@Csrayz Csrayz commented Jul 29, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

Expose inference-related profiler configuration in the worker to environment variables.

  • [FEAT] Expose PyTorch profiler config via environment variables
  • [DOC] update profiling.md
  • NOT change profiler in v0 worker. related to [RFC]: Deprecating vLLM V0 #18571

Test Plan

Test Result

(Optional) Documentation Update

Update docs/contributing/profiling.md for new profiler-related environment variables

@mergify mergify bot added documentation Improvements or additions to documentation v1 labels Jul 29, 2025
Copy link
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 exposes several PyTorch profiler configurations through environment variables, which is a great enhancement for debugging and performance analysis. My review focuses on an inconsistency in the naming of one of the new environment variables. The variable for memory profiling is named VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY in the code, but the documentation and consistency with other flags suggest it should be VLLM_TORCH_PROFILER_PROFILE_MEMORY. I've provided suggestions to correct this across the codebase to ensure consistency and prevent user confusion.

Copy link

👋 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.

🚀

* [FEAT] Expose PyTorch profiler config via environment variables
* [DOC] update profiling.md
* NOT change profiler in v0 worker. related to vllm-project#18571

Signed-off-by: Csrayz <[email protected]>
variables `VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY`

Signed-off-by: Csrayz <[email protected]>
Signed-off-by: Csrayz <[email protected]>
Copy link
Collaborator

@jikunshang jikunshang left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for contributing!

@jikunshang jikunshang added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 29, 2025
@Csrayz
Copy link
Contributor Author

Csrayz commented Jul 29, 2025

Why does accepting a commit suggestion cause the DCO workflow to fail?

@DarkLight1337
Copy link
Member

It's because GitHub doesn't sign off the commits

paragraphs to an unordered list

Signed-off-by: Csrayz <[email protected]>
@Csrayz
Copy link
Contributor Author

Csrayz commented Jul 30, 2025

Any way to run those workflow again? It seems like the failure was caused by network fluctuations.

PixPin_2025-07-30_09-06-18

@vllm-bot vllm-bot merged commit b917da4 into vllm-project:main Jul 30, 2025
62 of 65 checks passed
@DarkLight1337
Copy link
Member

Force merging as the CI failures aren't related

@noooop
Copy link
Contributor

noooop commented Jul 30, 2025

@DarkLight1337

Perhaps this PR is the first buildkite/ci/entrypoints-test-api-server - Failed

@DarkLight1337
Copy link
Member

I have seen these failures yesterday as well

@noooop
Copy link
Contributor

noooop commented Jul 30, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 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.

6 participants