-
Notifications
You must be signed in to change notification settings - Fork 261
[FMHA] Batch Prefill Support Improvements: Change KV Cache Layout & Large Page Size Support #3442
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
Jeff-Huang
merged 28 commits into
develop
from
ck_tile/batch_prefill_paged_size_16_rebase
Jan 5, 2026
Merged
[FMHA] Batch Prefill Support Improvements: Change KV Cache Layout & Large Page Size Support #3442
Jeff-Huang
merged 28 commits into
develop
from
ck_tile/batch_prefill_paged_size_16_rebase
Jan 5, 2026
Conversation
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
3c5f0b0 to
311bbbb
Compare
- create new problem struct BlockFmhaBatchPrefillPipelineProblem for batch prefill kernels - generate different page sizes of batch prefill kernels (1, 16)
…fx950 2. support page size 1024
poyenc
reviewed
Dec 29, 2025
include/ck_tile/ops/fmha/pipeline/block_fmha_pipeline_problem.hpp
Outdated
Show resolved
Hide resolved
poyenc
reviewed
Dec 29, 2025
poyenc
reviewed
Dec 29, 2025
poyenc
reviewed
Dec 29, 2025
2. correct some comments 3. add static assert to make sure v offsets is in same page within a tile.
kv_page_indices as a pointer of the lookup table.
poyenc
reviewed
Dec 31, 2025
2. add static check to make sure vlayout is row-major.
poyenc
reviewed
Jan 2, 2026
poyenc
previously approved these changes
Jan 2, 2026
Collaborator
|
@Jeff-Huang This is a significant PR. Please add one or more entries to CHANGELOG.md as appropriate. |
Contributor
Author
Thanks for the reminder! I've updated the CHANGELOG.md with the relevant entries in the latest commit. |
poyenc
approved these changes
Jan 5, 2026
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.
Proposed changes
This PR introduces significant improvements to the Batch Prefill kernels in ck_tile, enabling codegen support, change the KV layouts and support 1024 page size.
Codegen Support: Enabled code generation for batch_prefill kernels.
* Updated fmha_batch_prefill.py to generate kernels with different page sizes 1024.
* Pipeline & Problem Structure:
* Introduced BlockFmhaBatchPrefillPipelineProblem structure for better management of batch prefill problems.
* Updated block_fmha_batch_prefill_pipeline_qr_ks_vs_async.hpp to handle async operations and offsets
correctly.
Checklist
Please put an
xinto the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.clang-formaton all changed filesDiscussion
If this is a relatively large or complex change, feel free to start a discussion by explaining why you chose the solution you did and what alternatives you considered