Open
Conversation
jagrit06
reviewed
Feb 27, 2026
Member
|
Just so I understand the comparison - in table 1, the cublas is doing FP32xFP32 and in table 2 cublas is doing FP16xFP16 ? |
Collaborator
Author
Yeah cublas was measured with activation dtype. |
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.
Refs #2536.
Implements a qmv kernel using CUTLASS to do vectorized dequantization and fma, which works for all types of quants.
This kernel is fast for small problems for FP32xINT8, measured on A100:
The memory bandwidth is somehow lower for FP16xINT8:
Independent C++ source code for profiling the kernel
The memory bandwidth drops to half for FP8/FP4/INT4 quants unfortunately, which is likely because CUTLASS does not implement fast vectorized conversions for them. We can fix it by writing specializations of
dequant_fmaand I'll continue in followup PRs.This PR also does some refactoring to dispatch
quantized_mamtulto the fastest kernel depending on the problems size. For now we still preferfp_qmvoverqmvfor FP8/FP4 quants but eventually I will mergefp_qmvintoqmv.