ggerganov commited on
Commit
70332a0
·
unverified ·
1 Parent(s): adc4282

ggml : fix WASM build

Browse files
Files changed (2) hide show
  1. bindings/javascript/whisper.js +0 -0
  2. ggml.c +8 -8
bindings/javascript/whisper.js CHANGED
The diff for this file is too large to render. See raw diff
 
ggml.c CHANGED
@@ -2072,18 +2072,18 @@ static void ggml_vec_dot_q4_0(const int n, float * restrict s, const void * rest
2072
  float sum1 = 0.0f;
2073
 
2074
  for (int i = 0; i < nb; i += 2) {
2075
- const block_q4_0 * restrict x0 = &px[i + 0];
2076
- const block_q4_0 * restrict y0 = &py[i + 0];
2077
- const block_q4_0 * restrict x1 = &px[i + 1];
2078
- const block_q4_0 * restrict y1 = &py[i + 1];
2079
 
2080
  const v128_t m4b = wasm_u8x16_splat(0xf);
2081
  const v128_t s8b = wasm_i8x16_splat(0x8);
2082
 
2083
- const v128_t v0_0 = wasm_v128_load(x0.qs);
2084
- const v128_t v0_1 = wasm_v128_load(y0.qs);
2085
- const v128_t v1_0 = wasm_v128_load(x1.qs);
2086
- const v128_t v1_1 = wasm_v128_load(y1.qs);
2087
 
2088
  // 4-bit -> 8-bit
2089
  const v128_t v0_0l = wasm_v128_and(v0_0, m4b);
 
2072
  float sum1 = 0.0f;
2073
 
2074
  for (int i = 0; i < nb; i += 2) {
2075
+ const block_q4_0 * restrict x0 = &x[i + 0];
2076
+ const block_q4_0 * restrict y0 = &y[i + 0];
2077
+ const block_q4_0 * restrict x1 = &x[i + 1];
2078
+ const block_q4_0 * restrict y1 = &y[i + 1];
2079
 
2080
  const v128_t m4b = wasm_u8x16_splat(0xf);
2081
  const v128_t s8b = wasm_i8x16_splat(0x8);
2082
 
2083
+ const v128_t v0_0 = wasm_v128_load(x0->qs);
2084
+ const v128_t v0_1 = wasm_v128_load(y0->qs);
2085
+ const v128_t v1_0 = wasm_v128_load(x1->qs);
2086
+ const v128_t v1_1 = wasm_v128_load(y1->qs);
2087
 
2088
  // 4-bit -> 8-bit
2089
  const v128_t v0_0l = wasm_v128_and(v0_0, m4b);