-
-
Notifications
You must be signed in to change notification settings - Fork 11k
[V1][Perf] Simpler request output queues #15156
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
[V1][Perf] Simpler request output queues #15156
Conversation
Since we coalesce RequestOutput objects we don't need to use an actual queue. This changes to merge the outputs when added rather than when removed. Signed-off-by: Nick Hill <nhill@redhat.com>
|
👋 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 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 🚀 |
|
This pull request has merge conflicts that must be resolved before it can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Wondering if we should have some e2e test?
Signed-off-by: Nick Hill <nhill@redhat.com> # Conflicts: # vllm/v1/engine/async_llm.py # vllm/v1/engine/llm_engine.py # vllm/v1/engine/parallel_sampling.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only a nit. A unit test is definitely nice to have.
| else: | ||
| self.output = output | ||
|
|
||
| async def get(self) -> RequestOutput: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should have an invariant that output is not None if self.ready.wait() is true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the case but I'm not sure what you're suggesting to add here? self.ready.wait() just waits for the condition to be set, it can only ever return True (not even sure why it returns that rather than None). And then we immediately check self.output again before continuing.
Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com>
Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com>
added unit test
Signed-off-by: Nick Hill <nhill@redhat.com>
|
Thanks for adding a test @robertgshaw2-redhat! This should be good to merge now once the CI finishes. |
|
Pull request was closed
9d72daf
into
vllm-project:main
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Signed-off-by: Wes Medford <wryanmedford@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Co-authored-by: rshaw@neuralmagic.com <robertgshaw2@gmail.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
Queue operations showed up when profiling high qps.
Since we coalesce
RequestOutputobjects, we don't need to use an actual queue.This changes to merge the outputs when added rather than when removed.