HIP: Expand Q5_K and Q6_K tile widths for RDNA2 - #27558
Open
draetheus wants to merge 2 commits into
Open
Conversation
IMbackK
reviewed
Aug 25, 2026
| // J exceeds the per-expert width, wastes a full J-wide compute per tile. Use | ||
| // the per-channel width for selection only; the launch grid still uses | ||
| // ncols_max, which is a safe upper bound on any single expert's slots. | ||
| const int64_t ncols_sel = (GGML_CUDA_CC_IS_RDNA2(cc) && args.ids_dst != nullptr) |
Contributor
There was a problem hiding this comment.
could you test #24546 on rdna2 (enable it in mmq-config-rdna2.cuh) as an alterative to this?
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.
Overview
I recently performed a tile sweep of the RDNA2 config to see if there were any easy performance wins. Most of the config is optimal as is, however Q6_K and Q5_K see a noticeable performance increase by allowing J=128. The intermediate values do not seem to have an impact in benchmarks but were added for consistency.
Additional information
Test results from my Radeon Pro V620 on ROCm 7.14. I'm seeing up to 11.5% increase for Q6_K and up to 7.5% for Q5_K for classic quants. In my test of Qwen 3.8 27B, which is a more realistic mixed quant, I still see up to 8% increase. All test ops pass. Will post perplexity if requested.
Note that the small classic quants experience regression at pp128, while the larger mixed qwen model does not. I think this is an acceptable trade off but subject to debate and possible fixes.
Master
llama 8B Q5_K
llama 8B Q6_K
qwen35 27B Q6_K
Branch
llama 8B Q5_K
llama 8B Q6_K
qwen35 27B Q6_K
Requirements