Skip to content

Conversation

maobaolong
Copy link
Contributor

@maobaolong maobaolong commented Mar 18, 2025

This PR aimed to supply a way to reset specified Device prefix cache.

The existing device is CPU or GPU

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.

🚀

@mergify mergify bot added the frontend label Mar 18, 2025
@maobaolong maobaolong force-pushed the resetPrefixCacheByDevice branch from 17766d8 to 1769998 Compare March 19, 2025 01:02
@maobaolong maobaolong force-pushed the resetPrefixCacheByDevice branch from d570519 to faf1586 Compare March 19, 2025 03:54
@maobaolong maobaolong force-pushed the resetPrefixCacheByDevice branch from 27a8599 to 1f590cf Compare March 19, 2025 12:11
@comaniac comaniac added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 19, 2025
@maobaolong
Copy link
Contributor Author

@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?

@DarkLight1337
Copy link
Member

@comaniac can you approve the PR?

@comaniac
Copy link
Collaborator

@comaniac can you approve the PR?

Oops sorry I missed that

@vllm-bot vllm-bot merged commit 26dd972 into vllm-project:main Mar 19, 2025
44 of 47 checks passed
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))
Copy link
Member

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()
Copy link
Member

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)

Copy link
Contributor Author

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.

@maobaolong
Copy link
Contributor Author

@comaniac @DarkLight1337 @njhill Thanks for your review!

lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

force-merge frontend 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.

5 participants