Skip to content

Conversation

@Jeff-Huang
Copy link
Contributor

Proposed changes

  • Enable support for page_size=16 in the FMHA batch prefill kernel.
  • Remove the restriction that page size must be a multiple of the tile size (kN0).

Checklist

Please put an x into 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.

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally
  • I have added the test to REGRESSION_TESTS list defined at the top of CMakeLists.txt in tests/CMakeLists.txt, IF the test takes more than 30 seconds to run.
  • I have added inline documentation which enables the maintainers with understanding the motivation
  • I have removed the stale documentation which is no longer relevant after this pull request
  • (If this change is user-facing) I have added release notes which provide the end users with a brief summary of the improvement from this pull request
  • I have run clang-format on all changed files
  • Any dependent changes have been merged

Discussion

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Jeff-Huang Jeff-Huang force-pushed the batch_prefill_page_size_16_vectorized branch from c9b1a8e to ef5e6f1 Compare January 15, 2026 06:41
OffsetVecType& kv_offset_vec,
index_t global_seq_offset = 0)
{
static constexpr index_t kLog2PageSize = []() constexpr {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can omit the parentheses () if no parameters are needed.

poyenc
poyenc previously approved these changes Jan 15, 2026
@Jeff-Huang Jeff-Huang force-pushed the batch_prefill_page_size_16_vectorized branch from ef5e6f1 to 1e7458c Compare January 15, 2026 07:03
- Remove redundant `kLog2PageSize` and `kIsVTileFitsInPage` from template args.
- Add static assert to forbid `page_size=1` with vectorized layout.
@Jeff-Huang Jeff-Huang force-pushed the batch_prefill_page_size_16_vectorized branch from 1e7458c to af868e4 Compare January 15, 2026 07:27
@Jeff-Huang Jeff-Huang merged commit 993d3e2 into develop Jan 15, 2026
21 checks passed
@Jeff-Huang Jeff-Huang deleted the batch_prefill_page_size_16_vectorized branch January 15, 2026 14:11
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.

3 participants