CUTLASS 3.5.1 (#1623)

* CUTLASS 3.5.1

* updates, optimizations, fixes
This commit is contained in:
Vijay Thakkar
2024-07-29 08:46:24 -04:00
committed by GitHub
parent 56b46e2d13
commit be60a0b272
312 changed files with 19793 additions and 6775 deletions
+33
View File
@@ -58,6 +58,39 @@ enum {
FP_NORMAL
};
CUTLASS_HOST_DEVICE
int fpclassify(float const& f) {
uint32_t s;
#if defined(__CUDA_ARCH__)
s = reinterpret_cast<uint32_t const &>(f);
#else
std::memcpy(&s, &f, sizeof(s));
#endif
uint32_t exp = s & 0x7f800000;
uint32_t mantissa = s & 0x007fffff;
if (exp == 0x7f800000) {
if (mantissa) {
return FP_NAN;
}
else {
return FP_INFINITE;
}
}
else if (!exp) {
if (mantissa) {
return FP_SUBNORMAL;
}
else {
return FP_ZERO;
}
}
return FP_NORMAL;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
} // namespace cutlass