-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make integer_subbyte Fully Compliant with is_integral #1632
base: main
Are you sure you want to change the base?
Conversation
#include <cute/numeric/integral_constant.hpp> | ||
#include <cutlass/integer_subbyte.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were these headers required? we already had
using int2_t = cutlass::int2b_t;
using int4_t = cutlass::int4b_t;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double-checked and the second isn't but the first is, due to is_integral
. I will remove the first. My IDE (CLion) is very pedantic sometimes, that's why I initially added.
@@ -101,4 +103,7 @@ using uint_byte = uint_bit<8*N>; | |||
template <int N> | |||
using uint_byte_t = typename uint_byte<N>::type; | |||
|
|||
template<int Bits, bool Signed> | |||
struct is_integral<cutlass::integer_subbyte<Bits, Signed>> : true_type {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one for unsigned too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template covers both since unsigned is Signed=false
, see here
@ccecka for review too |
If needed, I can also register float8 and half for |
This PR has been labeled |
This PR has been labeled |
Context
See #1631
Change
Adds integral type trait for
integer_subbyte