Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Oct 8, 2024
1 parent 9fa2532 commit 6a1c346
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/layer/arm/gemm_int8_fp16s.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static void compute_A_tile_fp16_int8_scales(const Mat& A, Mat& scales, float B_s
#if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
const __fp16* p0 = (const __fp16*)A + (i + ii) * A_hstep;

__fp16 absmax = 0.f;
float absmax = 0.f;
float16x8_t _amax0 = vdupq_n_f16((__fp16)0.f);
float16x8_t _amax1 = vdupq_n_f16((__fp16)0.f);
float16x8_t _amax2 = vdupq_n_f16((__fp16)0.f);
Expand Down Expand Up @@ -356,10 +356,10 @@ static void compute_A_tile_fp16_int8_scales(const Mat& A, Mat& scales, float B_s
p0 += 8;
}
float16x4_t _aa = vmax_f16(vget_low_f16(_amax0), vget_high_f16(_amax0));
absmax = (__fp16)vmaxvq_f32(vcvt_f32_f16(_aa));
absmax = vmaxvq_f32(vcvt_f32_f16(_aa));
for (; kk < K; kk++)
{
absmax = std::max(absmax, (__fp16)fabsf(p0[0]));
absmax = std::max(absmax, (float)fabsf(p0[0]));
p0++;
}
#else // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
Expand Down

0 comments on commit 6a1c346

Please sign in to comment.