[Bugfix] fix ragged attention kernel auto-tuning table key#9497
Merged
yaochengji merged 7 commits intomasterfrom Jul 23, 2025
Merged
[Bugfix] fix ragged attention kernel auto-tuning table key#9497yaochengji merged 7 commits intomasterfrom
yaochengji merged 7 commits intomasterfrom
Conversation
53077e8 to
3b99bc8
Compare
Collaborator
Author
|
@bythew3i could you take a look? |
bythew3i
approved these changes
Jul 22, 2025
Contributor
bythew3i
left a comment
There was a problem hiding this comment.
Thanks Chengji.
It is intended to pad. I think the bug is in our autotuning instead of here, we should pad the num_heads before running autotune to make the table smaller.
To unblock the model, I think this PR LGTM but we really need to fix the autotune script.
Collaborator
Author
Thanks @bythew3i , will change it back when auto-tuning table is corrected. |
vanbasten23
reviewed
Jul 22, 2025
vanbasten23
reviewed
Jul 22, 2025
5ef3bc6 to
0bbf02d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the bug that q_heads, kv_heads and max_model_len are accidentally padded to power of 2.
Without fix, models like QWen2.5-7B (q_heads=28, kv_heads=4) cannot hit the attention table.