-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[FEAT]Support reset prefix cache by specified device #15003
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
[FEAT]Support reset prefix cache by specified device #15003
Conversation
👋 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 🚀 |
17766d8
to
1769998
Compare
d570519
to
faf1586
Compare
27a8599
to
1f590cf
Compare
@comaniac Thanks for your review and help, now almost all the ci checks are passed except some of them, but it seems have no relevant with this PR? |
@comaniac can you approve the PR? |
Oops sorry I missed that |
device_str = raw_request.query_params.get("device") | ||
if device_str is not None: | ||
device = Device[device_str.upper()] | ||
logger.info("Resetting prefix cache with specific %s...", str(device)) |
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.
logger.info("Resetting prefix cache with specific device: %s...", str(device))
|
||
def reset_prefix_cache(self): | ||
def reset_prefix_cache(self, device: Optional[Device] = None): | ||
self.engine_core.reset_prefix_cache() |
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.
It looks like this isn't implemented for V1... should that be included? (we are aiming to deprecate v0 now)
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.
I will implement this for v1 after #13377 merged.
@comaniac @DarkLight1337 @njhill Thanks for your review! |
) Signed-off-by: Louis Ulmer <[email protected]>
) Signed-off-by: Mu Huai <[email protected]>
This PR aimed to supply a way to reset specified Device prefix cache.
The existing device is CPU or GPU