Skip to content

Commit

Permalink
Adds NoBetaScaling for LinearCombination
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheng Zeng authored May 12, 2021
1 parent 38e8b29 commit a68d7cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/cutlass/epilogue/thread/linear_combination.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ class LinearCombination {
multiplies<ComputeFragment> mul_add_source;
multiply_add<ComputeFragment> mul_add_accumulator;

intermediate = mul_add_source(beta_, converted_source); // X = beta * C + uniform
if (Scale == ScaleType::NoBetaScaling)
intermediate = converted_source;
else
intermediate = mul_add_source(beta_, converted_source); // X = beta * C + uniform

intermediate = mul_add_accumulator(alpha_, converted_accumulator, intermediate); // D = alpha * Accum + X

// Convert to destination numeric type
Expand Down

0 comments on commit a68d7cd

Please sign in to comment.