From 795241ceb9146f1e7f303c19de3d82516593b295 Mon Sep 17 00:00:00 2001 From: Anagha Rao Date: Fri, 23 Feb 2024 12:08:03 -0800 Subject: [PATCH] adding back 120 character --- .../test/contrib_ops/matmul_integer_to_float_test.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/onnxruntime/test/contrib_ops/matmul_integer_to_float_test.cc b/onnxruntime/test/contrib_ops/matmul_integer_to_float_test.cc index ed1911be4cf77..c7f2ec89fb817 100644 --- a/onnxruntime/test/contrib_ops/matmul_integer_to_float_test.cc +++ b/onnxruntime/test/contrib_ops/matmul_integer_to_float_test.cc @@ -39,12 +39,8 @@ static void CalculateMatMulIntegerToFloat(const int64_t M, const int64_t N, cons for (int64_t n = 0; n < N; n++) { float sum = 0.0f; for (int64_t k = 0; k < K; k++) { - float A_dequantized = has_zp ? - (static_cast(A_data[m * K + k]) - static_cast(A_zero_point[0])) * A_scale[0] : - A_data[m * K + k] * A_scale[0]; - float B_dequantized = has_zp ? - (static_cast(B_data[k * N + n]) - static_cast(B_zero_point[n])) * B_scale[n] : - B_data[k * N + n] * B_scale[n]; + float A_dequantized = has_zp ? (static_cast(A_data[m * K + k]) - static_cast(A_zero_point[0])) * A_scale[0] : A_data[m * K + k] * A_scale[0]; + float B_dequantized = has_zp ? (static_cast(B_data[k * N + n]) - static_cast(B_zero_point[n])) * B_scale[n] : B_data[k * N + n] * B_scale[n]; sum += A_dequantized * B_dequantized; } @@ -81,8 +77,7 @@ void TestMatMulIntegerToFloat(bool is_matrix_b_constant, std::vector tmp_B_data; tmp_B_data = random.Uniform(B_dims, - (constexpr(std::is_same_v)) ? - std::numeric_limits::lowest() / 2 :std::numeric_limits::lowest(), + (constexpr(std::is_same_v)) ? std::numeric_limits::lowest() / 2 : std::numeric_limits::lowest(), std::numeric_limits::max() / 2); std::transform(tmp_B_data.begin(), tmp_B_data.end(), std::back_inserter(B_data), [](int32_t v) -> WType { return static_cast(v);