-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[Hardware][TPU]Enable ragged paged attention kernel and resolve recompilation issue #14310
base: main
Are you sure you want to change the base?
[Hardware][TPU]Enable ragged paged attention kernel and resolve recompilation issue #14310
Conversation
yaochengji
commented
Mar 5, 2025
•
edited by github-actions
bot
Loading
edited by github-actions
bot
- enable ragged paged attention kernel
- resolve recompilation issue
- change the layout of kv cache from (num_kv_heads, num_blocks, block_size, head_size) to (num_blocks, block_size, num_kv_heads, head_size)
👋 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 |
d8595c5
to
f366aa1
Compare
Signed-off-by: Chengji Yao <[email protected]>
f366aa1
to
8d83065
Compare
This PR depends on pytorch/xla#8797, I will update the torch/xla nightly version tomorrow |
@@ -168,8 +164,9 @@ def forward( | |||
attn_metadata.num_seqs, | |||
num_kv_pages_per_block=NUM_KV_PAGES_PER_BLOCK, | |||
num_queries_per_block=NUM_QUERIES_PER_BLOCK, | |||
use_kernel=use_kernel, | |||
) | |||
vmem_limit_bytes=32 * 1024 * 1024, |
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.
Should this shift depending on 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.
Yes, @vanbasten23 is tuning the kernel parameter, will update it later.
Signed-off-by: Chengji Yao <[email protected]>