[CUDA] Use qmv kernel for fp quantizations#3239
Merged
zcbenz merged 1 commit intoml-explore:mainfrom Mar 11, 2026
Merged
Conversation
angeloskath
approved these changes
Mar 10, 2026
Member
angeloskath
left a comment
There was a problem hiding this comment.
Perfect! Do you think we should test on Hopper and Blackwell as well?
Collaborator
Author
|
Tested on H100 this is also 9% faster, but on DGX the old fp_qmv is at least 20% faster 😲. |
c675806 to
2fc2dfc
Compare
Collaborator
Author
|
For sm120/121 the fp_qmv kernel is faster because it uses less registers, I'm not entirely sure whether this is a Blackwell thing or because the consumer hardwares have less registers and do not optimize vectorized instructions (There is no spare B200 for me to test). Anyway I'm keeping fp_qmv for now for sm >= 100, and I'm going to work on another version of qmv that is implemented in a similar style using less registers, assuming the affine quantization would also benefit from it. |
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.
Use the QMV kernel for fp quantizations.
Did a simple benchmarking and it is about 9% faster on A100.
Details