From 09820843ef09224e4cb6b471179e422be86a35ff Mon Sep 17 00:00:00 2001 From: chenjiaoAngel Date: Mon, 20 Apr 2020 19:32:19 +0800 Subject: [PATCH] fix gemm_s8 --- lite/backends/arm/math/gemm_prepacked_int8.cc | 2 +- lite/backends/arm/math/gemm_s8.cc | 8 ++++---- lite/backends/arm/math/gemm_s8.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lite/backends/arm/math/gemm_prepacked_int8.cc b/lite/backends/arm/math/gemm_prepacked_int8.cc index a4461061ef..3602f9ca09 100644 --- a/lite/backends/arm/math/gemm_prepacked_int8.cc +++ b/lite/backends/arm/math/gemm_prepacked_int8.cc @@ -1367,7 +1367,7 @@ inline void gemm_sdot_int8_kernel(const int8_t* a_ptr, "fcmge v4.4s, v30.4s, v2.4s \n" /* vcgeq_f32 */ \ "fmul v5.4s, v30.4s, v3.4s \n" /* vmulq_f32 */ \ "fcmge v6.4s, v31.4s, v2.4s \n" /* vcgeq_f32 */ \ - "fmul v7.4s, v32.4s, v3.4s \n" /* vmulq_f32 */ \ + "fmul v7.4s, v31.4s, v3.4s \n" /* vmulq_f32 */ \ "bif v30.16b, v5.16b, v4.16b \n" /* choose*/ \ "bif v31.16b, v7.16b, v6.16b \n" /* choose*/ \ "12: \n" diff --git a/lite/backends/arm/math/gemm_s8.cc b/lite/backends/arm/math/gemm_s8.cc index 2bc3f5f464..fbaade0d9c 100644 --- a/lite/backends/arm/math/gemm_s8.cc +++ b/lite/backends/arm/math/gemm_s8.cc @@ -30,8 +30,8 @@ void gemm_s8(bool is_transA, Dtype* C, const float* bias, bool is_bias, - bool is_relu, const float* scale, + const operators::ActivationParam act_param, ARMContext* ctx) { int hblock = get_hblock_int8(ctx); int m_roundup = hblock * ((M + hblock - 1) / hblock); @@ -42,7 +42,7 @@ void gemm_s8(bool is_transA, prepackA_int8(packed_A, A, lda, 0, M, 0, K, is_transA, ctx); gemm_prepack_int8( - packed_A, B, bias, C, M, N, K, is_bias, is_relu, is_transB, scale, ctx); + packed_A, B, bias, C, M, N, K, is_bias, is_transB, scale, act_param, ctx); TargetFree(TargetType::kARM, packed_A); } @@ -56,8 +56,8 @@ template void gemm_s8(bool is_transA, float* C, const float* bias, bool is_bias, - bool is_relu, const float* scale, + const operators::ActivationParam act_param, ARMContext* ctx); template void gemm_s8(bool is_transA, @@ -70,8 +70,8 @@ template void gemm_s8(bool is_transA, int8_t* C, const float* bias, bool is_bias, - bool is_relu, const float* scale, + const operators::ActivationParam act_param, ARMContext* ctx); } // namespace math diff --git a/lite/backends/arm/math/gemm_s8.h b/lite/backends/arm/math/gemm_s8.h index 0a37c5e3a4..231384568a 100644 --- a/lite/backends/arm/math/gemm_s8.h +++ b/lite/backends/arm/math/gemm_s8.h @@ -34,8 +34,8 @@ void gemm_s8(bool is_transA, Dtype* C, const float* bias, bool is_bias, - bool is_relu, const float* scale, + const operators::ActivationParam act_param, ARMContext* ctx); } // namespace math -- GitLab