]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml : fix WASM build
authorGeorgi Gerganov <redacted>
Sat, 29 Apr 2023 18:37:23 +0000 (21:37 +0300)
committerGeorgi Gerganov <redacted>
Sat, 29 Apr 2023 18:37:23 +0000 (21:37 +0300)
ggml.c

diff --git a/ggml.c b/ggml.c
index 4d53b46282d880e3256ecc3f23d671431bae31cb..c6dc38be2c44111b3473979c087220cd239849b1 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -1087,7 +1087,7 @@ static void quantize_row_q4_0(const float * restrict x, void * restrict vy, int
             const v128_t v  = wasm_f32x4_mul(srcv[l], wasm_f32x4_splat(id));
             const v128_t vf = wasm_f32x4_add(v, wasm_f32x4_splat(8.5f));
             const v128_t vi = wasm_i32x4_trunc_sat_f32x4(vf);
-            const v128_t vc = wasm_i32x4_min_u(vi, wasm_i32x4_splat(15));
+            const v128_t vc = wasm_i32x4_min(vi, wasm_i32x4_splat(15));
 
             y[i].qs[2*l + 0] = wasm_i32x4_extract_lane(vc, 0) | (wasm_i32x4_extract_lane(vc, 1) << 4);
             y[i].qs[2*l + 1] = wasm_i32x4_extract_lane(vc, 2) | (wasm_i32x4_extract_lane(vc, 3) << 4);