KEMBAR78
Remove AsyncLLMEngine busy loop, shield background task by Yard1 · Pull Request #1059 · vllm-project/vllm · GitHub
Skip to content

Conversation

@Yard1
Copy link
Collaborator

@Yard1 Yard1 commented Sep 15, 2023

This PR reduces CPU utilisation of AsyncLLMEngine by replacing busy looping with an asyncio.Event triggered whenever there are new requests, and makes sure that the background loop task is shielded from cancellation.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
@Yard1 Yard1 changed the title Remove AsyncLLMEngine busy loop, shield bg task Remove AsyncLLMEngine busy loop, shield background task Sep 15, 2023
@Yard1
Copy link
Collaborator Author

Yard1 commented Sep 15, 2023

cc @zhuohan123

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
@Yard1 Yard1 requested a review from zhuohan123 September 16, 2023 00:59
Copy link
Member

@zhuohan123 zhuohan123 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 the fix!

@zhuohan123 zhuohan123 merged commit ff36139 into vllm-project:main Sep 17, 2023
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
yiliu30 pushed a commit to yiliu30/vllm-fork that referenced this pull request Apr 15, 2025
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