Skip to content

Commit 9517aee

Browse files
committed
rm redundant clamp
1 parent 226d592 commit 9517aee

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,14 +1722,8 @@ void quantize_row_q8_K(const float * restrict x, void * restrict y, int64_t k) {
17221722

17231723
// Pack into 16 i8 values
17241724
v128_t i8 = wasm_i8x16_narrow_i16x8(
1725-
wasm_i16x8_narrow_i32x4(
1726-
wasm_i32x4_min(wasm_i32x4_max(i0, wasm_i32x4_splat(-127)), wasm_i32x4_splat(127)),
1727-
wasm_i32x4_min(wasm_i32x4_max(i1, wasm_i32x4_splat(-127)), wasm_i32x4_splat(127))
1728-
),
1729-
wasm_i16x8_narrow_i32x4(
1730-
wasm_i32x4_min(wasm_i32x4_max(i2, wasm_i32x4_splat(-127)), wasm_i32x4_splat(127)),
1731-
wasm_i32x4_min(wasm_i32x4_max(i3, wasm_i32x4_splat(-127)), wasm_i32x4_splat(127))
1732-
)
1725+
wasm_i16x8_narrow_i32x4(i0, i1),
1726+
wasm_i16x8_narrow_i32x4(i2, i3)
17331727
);
17341728
wasm_v128_store(yc[i].qs + j, i8);
17351729

0 commit comments

Comments
 (0)