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
@@ -379,6 +379,9 @@ struct SiLu<Array<T, N>> {
}
};
template <typename T>
using ScaledSiLu = Scale<SiLu<T>>;
// Hardswish operator introduced by Howard et al. in the following paper
// "Searching for MobileNetV3" (2019)
// https://arxiv.org/pdf/1905.02244.pdf
@@ -219,10 +219,10 @@ public:
/// Clamping constant value
ElementCompute const kClampMax =
ElementCompute(platform::numeric_limits<ElementOutput>::max());
ElementCompute(cutlass::platform::numeric_limits<ElementOutput>::max());
ElementCompute const kClampMin =
ElementCompute(platform::numeric_limits<ElementOutput>::lowest());
ElementCompute(cutlass::platform::numeric_limits<ElementOutput>::lowest());
intermediate = max_accumulator(intermediate, kClampMin);
intermediate = min_accumulator(intermediate, kClampMax);
@@ -260,10 +260,10 @@ public:
/// Clamping constant value
ElementCompute const kClampMax =
ElementCompute(platform::numeric_limits<ElementOutput>::max());
ElementCompute(cutlass::platform::numeric_limits<ElementOutput>::max());
ElementCompute const kClampMin =
ElementCompute(platform::numeric_limits<ElementOutput>::lowest());
ElementCompute(cutlass::platform::numeric_limits<ElementOutput>::lowest());
intermediate = max_accumulator(intermediate, kClampMin);
intermediate = min_accumulator(intermediate, kClampMax);
@@ -299,7 +299,7 @@ public:
using ElementCompute = float;
static_assert(
platform::numeric_limits<ElementOutput>::is_integer,
cutlass::platform::numeric_limits<ElementOutput>::is_integer,
"This elementwise op expects the output to be int.");
static int const kCount = Count;
@@ -499,7 +499,7 @@ class FastLinearCombinationClamp {
using ElementCompute = float;
static_assert(
platform::numeric_limits<ElementOutput>::is_integer,
cutlass::platform::numeric_limits<ElementOutput>::is_integer,
"This elementwise op expects the output to be int.");
static int const kCount = Count;
@@ -447,7 +447,7 @@ public:
// Compute threshold optionally
intermediate = relu(threshold_, intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;
@@ -492,7 +492,7 @@ public:
// Compute threshold optionally
intermediate = relu(threshold_, intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;
@@ -540,7 +540,7 @@ public:
// Compute threshold optionally
intermediate = relu(threshold_, intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;
@@ -418,7 +418,7 @@ public:
// Compute threshold optionally
intermediate = relu(intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;
@@ -463,7 +463,7 @@ public:
// Compute threshold optionally
intermediate = relu(intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;
@@ -511,7 +511,7 @@ public:
// Compute threshold optionally
intermediate = relu(intermediate);
if (platform::numeric_limits<ElementOutput>::is_integer) {
if (cutlass::platform::numeric_limits<ElementOutput>::is_integer) {
// Convert floats back to INT
FragmentAccumulator scaled_accumulator;