Repository navigation
Remove custom fp4/fp8 classes - #3212
Merged
Merged
Conversation
Collaborator
|
Thank you, looks like a great alternative to custom header. Do you mind if I put myself as a reviewer? |
Member
Author
|
It is always a good thing having more people reviewing this 🙏 |
nastya236
self-requested a review
March 6, 2026 19:02
nastya236
approved these changes
Mar 7, 2026
nastya236
left a comment
Collaborator
There was a problem hiding this comment.
Looks awesome, thank you for adding this! Much cleaner than with custom classes.
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.
We have some custom fp4/fp8 classes in
cuda/quantized/cuda_fp4.hfor building with not so recent CUDA toolkits (like 12.6), in which case there is no builtin equivalents.This PR replaces them with the equivalents in CUTLASS, which generates same code with CUDA's builtin
__nv_fp8_xxs/__nv_fp8_xxxand provides decent fallbacks for old CUDA toolkits.The main benefit is we can just rely on
cutlass::NumericArrayConverterto do vectorized number conversions, instead of dealing with various CUDA types.