Repository navigation
cuda: opt-in split-K for the PQ2_0 one-column ffn_down mat-vec on Hopper (GGML_CUDA_PQ2_SPLITK) - #424
Merged
Merged
Conversation
…per (GGML_CUDA_PQ2_SPLITK) Parameterize the PQ2_0 multi-column mat-vec by rows per group, warps per CTA, split-K factor and unroll, and route all weight reads through one helper that knows the block layout. The default instantiation (rows as before, 4 warps, split-K 1, unroll 1) keeps the existing loop and reduction order. GGML_CUDA_PQ2_SPLITK=1 selects 2 rows, 8 warps, split-K 2 for the one-column plain (non-gate) mat-vec on Hopper when K x M is 12288 x 4096 or 17408 x 5120. Each row's K range is split between two warps whose partial sums are added in warp order through shared memory, so the float summation order differs from the default path. Default off: with the variable unset or 0 the launch path and the results are unchanged.
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.
What
ffn_downmat-vec on Hopper, behindGGML_CUDA_PQ2_SPLITK=1(default off).Why
How
Testing