Skip to content
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

[KVCACHE] Improved schedule for prefill attention #17432

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

krishnaraj36
Copy link
Contributor

Improvements

  • Added Tranpose to K for better Vectorization during Matmul.
  • Improved Load Schedule.
  • Improved a bit more than 2x is most cases.
    Llama-2 7B observation
    -----------kernel----------------baseline----------optimized-
    ---batch_prefill_ragged_kv------15 ms-------------7.1 ms

Improvements

Added Tranpose to K for better Vectorization during Matmul.
Improved Load Schedule.
Improved a bit more than 2x is most cases.
Llama-2 7B observation
-------kernel----------------baseline----------optimized-
---batch_prefill_ragged_kv----15 ms-------------7.1 ms
@tqchen tqchen merged commit 79abc03 into apache:main Oct 3, 2024
14 checks passed
MasterJH5574 added a commit that referenced this pull request Oct 14, 2024
tqchen pushed a commit that referenced this pull request Oct 15, 2024
Revert "[KVCACHE] Improved schedule for prefill attention (#17432)"

This reverts commit 79abc03.
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