ggerganov commited on
Commit
c3d7603
·
unverified ·
1 Parent(s): 5fa72ca

ggml : fix WASM build

Browse files
Files changed (1) hide show
  1. ggml.c +1 -1
ggml.c CHANGED
@@ -1087,7 +1087,7 @@ static void quantize_row_q4_0(const float * restrict x, void * restrict vy, int
1087
  const v128_t v = wasm_f32x4_mul(srcv[l], wasm_f32x4_splat(id));
1088
  const v128_t vf = wasm_f32x4_add(v, wasm_f32x4_splat(8.5f));
1089
  const v128_t vi = wasm_i32x4_trunc_sat_f32x4(vf);
1090
- const v128_t vc = wasm_i32x4_min_u(vi, wasm_i32x4_splat(15));
1091
 
1092
  y[i].qs[2*l + 0] = wasm_i32x4_extract_lane(vc, 0) | (wasm_i32x4_extract_lane(vc, 1) << 4);
1093
  y[i].qs[2*l + 1] = wasm_i32x4_extract_lane(vc, 2) | (wasm_i32x4_extract_lane(vc, 3) << 4);
 
1087
  const v128_t v = wasm_f32x4_mul(srcv[l], wasm_f32x4_splat(id));
1088
  const v128_t vf = wasm_f32x4_add(v, wasm_f32x4_splat(8.5f));
1089
  const v128_t vi = wasm_i32x4_trunc_sat_f32x4(vf);
1090
+ const v128_t vc = wasm_i32x4_min(vi, wasm_i32x4_splat(15));
1091
 
1092
  y[i].qs[2*l + 0] = wasm_i32x4_extract_lane(vc, 0) | (wasm_i32x4_extract_lane(vc, 1) << 4);
1093
  y[i].qs[2*l + 1] = wasm_i32x4_extract_lane(vc, 2) | (wasm_i32x4_extract_lane(vc, 3) << 4);