feat: add split_k support for block scale gemm bquant mode.#3653
Merged
ThomasNing merged 9 commits intodevelopfrom Feb 2, 2026
Merged
feat: add split_k support for block scale gemm bquant mode.#3653ThomasNing merged 9 commits intodevelopfrom
ThomasNing merged 9 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements split-K support for BQuantGrouped quantized GEMM operations, enabling parallel processing of the K dimension across multiple workgroups. The implementation handles packed data types (fp8i4, bf8i4) and enforces alignment constraints to ensure correct quantization scale application.
Changes:
- Adds split-K offset calculation for packed data types with proper byte-boundary alignment
- Implements BQ (quantization scale) pointer offsetting for split-K batches
- Adds validation to ensure split-K batch sizes align with quantization groups and packed element boundaries
- Updates example configurations from Prefill (128x128 tiles) to Decode (16x64 tiles) for better split-K performance
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| include/ck_tile/ops/gemm_quant/kernel/gemm_quant_kernel.hpp | Core kernel changes: split-K offset calculation, BQ pointer offsetting, tensor view creation, and validation logic |
| example/ck_tile/38_block_scale_gemm/run_gemm_quant_example.inc | Removes premature split-K rejection, delegates validation to kernel |
| example/ck_tile/38_block_scale_gemm/gemm_bquant_quantgrouped_*.cpp | Changes config from Prefill to Decode for fp8, bf8, fp8i4, bf8i4 variants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@AviralGoelAMD LGTM, please solve the CI |
ce811b5 to
08998da
Compare
amd-khushbu
reviewed
Jan 30, 2026
Collaborator
amd-khushbu
left a comment
There was a problem hiding this comment.
Look good over all, except the one comment.
ThomasNing
approved these changes
Feb 2, 2026
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.
This PR implements split-K support for BQuantGrouped mode across all data types (fp8, bf8, fp8i4, bf8i4), with proper handling of packed data types.
Key Changes
1. Split-K Offset Calculation for Packed Types
(KRead / BPackedSize)bytes for int4 types2. Validation Constraints
KRead % BPackedSize == 0to ensure split-K batches align on byte boundariesKRead % QuantGroupSize::kK == 0for proper scale applicationASCII Visualization: pk_int4_t Split-K Alignment
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