Skip to content

Allocate kv_cache with stride order #16605

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 2 commits into from
Apr 26, 2025

Conversation

wenscarl
Copy link
Contributor

@wenscarl wenscarl commented Apr 14, 2025

Allow KV cache manager to support an stride order to the allocation which the attention backend could provide. Mainly affect Flashinfer backend. Ref. #8200
@tlrmchlsmth @LucasWilkinson

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.

🚀

Copy link
Collaborator

@LucasWilkinson LucasWilkinson left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! this is looking much better! Left a few nits, please also fix the pre-commit failures

@wenscarl wenscarl force-pushed the cache_alloc_w_stride branch 3 times, most recently from 7cd508d to 8a6c7fe Compare April 16, 2025 14:27
@wenscarl wenscarl requested a review from LucasWilkinson April 16, 2025 14:58
Copy link
Collaborator

@LucasWilkinson LucasWilkinson 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 contribution!

@wenscarl wenscarl force-pushed the cache_alloc_w_stride branch from c13e5d6 to 343378f Compare April 22, 2025 15:02
@simon-mo simon-mo added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 22, 2025
@simon-mo simon-mo enabled auto-merge (squash) April 22, 2025 16:42
Copy link

mergify bot commented Apr 23, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @wenscarl.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Apr 23, 2025
auto-merge was automatically disabled April 23, 2025 14:58

Head branch was pushed to by a user without write access

@wenscarl wenscarl force-pushed the cache_alloc_w_stride branch from 18d6e6e to aba3c45 Compare April 23, 2025 15:06
@mergify mergify bot removed the needs-rebase label Apr 23, 2025
@DarkLight1337
Copy link
Member

Can you merge from main to fix docker build?

@wenscarl wenscarl force-pushed the cache_alloc_w_stride branch from aba3c45 to 33d5969 Compare April 24, 2025 15:38
@wenscarl
Copy link
Contributor Author

Can you merge from main to fix docker build?

Done.

@DarkLight1337
Copy link
Member

Please check whether the failing kernels test is related to this PR

Signed-off-by: shuw <[email protected]>
@wenscarl wenscarl force-pushed the cache_alloc_w_stride branch from 7dbc7ef to a48be76 Compare April 25, 2025 14:46
@wenscarl
Copy link
Contributor Author

wenscarl commented Apr 25, 2025

Please check whether the failing kernels test is related to this PR

Only test_cache.py failure is related. Fixed by reducing tensor size to avoid OOM. The spec-decoding tests should be irrelevant.

@LucasWilkinson LucasWilkinson enabled auto-merge (squash) April 25, 2025 18:05
@vllm-bot vllm-bot merged commit 9e96f56 into vllm-project:main Apr 26, 2025
71 of 73 checks passed
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
adobrzyn pushed a commit to HabanaAI/vllm-fork that referenced this pull request Apr 30, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
zzzyq pushed a commit to zzzyq/vllm that referenced this pull request May 24, 2025
minpeter pushed a commit to minpeter/vllm that referenced this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants