Skip to content

Commit 6c88b3b

Browse files
authored
ggml: fix loongarch quantize_row_q8_1 error (ggml-org#14827)
1 parent 14c28df commit 6c88b3b

File tree

1 file changed

+1
-1
lines changed
  • ggml/src/ggml-cpu/arch/loongarch

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/arch/loongarch/quants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void quantize_row_q8_1(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy, i
544544
__m128 max4 = __lsx_vfmax_s( lasx_extractf128( max_abs, 1 ), lasx_extractf128( max_abs, 0) );
545545
max4 = __lsx_vfmax_s( max4, (__m128)__lsx_vpickod_d((__m128i) max4, (__m128i)max4 ) );
546546
__m128 tmp = max4;
547-
max4 = __lsx_vfmax_s( max4, (__m128)__lsx_vextrins_w((__m128i)tmp, (__m128i)max4, 0x10 ));
547+
max4 = __lsx_vfmax_s( max4, (__m128)__lsx_vextrins_w((__m128i)tmp, (__m128i)max4, 0x1 ));
548548
const float max_scalar = ((v4f32)max4)[0];
549549

550550
// Quantize these floats

0 commit comments

Comments
 (0)