Skip to content

Commit

Permalink
Use std::fma in tail of Fused8BitRowwiseQuantizedSBFloatToFloatOrHalf…
Browse files Browse the repository at this point in the history
…Avx2 (#1191)

Summary:
Pull Request resolved: #1191

Another missing FMA.

Reviewed By: jspark1105

Differential Revision: D37670913

fbshipit-source-id: da0a95d4e1dff8d6015a2d5fd398f56e945bd17a
  • Loading branch information
swolchok authored and facebook-github-bot committed Jul 8, 2022
1 parent 64a5c4a commit 56cd603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QuantUtilsAvx2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2164,8 +2164,8 @@ void Fused8BitRowwiseQuantizedSBFloatToFloatOrHalfAvx2(
}

for (; col < output_columns; ++col) {
float output_value =
input_row[col] * input_row_scale_bias[0] + input_row_scale_bias[1];
float output_value = std::fma(
input_row[col], input_row_scale_bias[0], input_row_scale_bias[1]);
if (std::is_same<OutputType, float>()) {
output_row[col] = output_value;
} else {
Expand Down

0 comments on commit 56cd603

Please sign in to comment.