Skip to content

Commit ebef1e8

Browse files
committed
ggml : fix WASM build
1 parent 114df38 commit ebef1e8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

bindings/javascript/whisper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ggml.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,18 +2072,18 @@ static void ggml_vec_dot_q4_0(const int n, float * restrict s, const void * rest
20722072
float sum1 = 0.0f;
20732073

20742074
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];
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];
20792079

20802080
const v128_t m4b = wasm_u8x16_splat(0xf);
20812081
const v128_t s8b = wasm_i8x16_splat(0x8);
20822082

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);
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);
20872087

20882088
// 4-bit -> 8-bit
20892089
const v128_t v0_0l = wasm_v128_and(v0_0, m4b);

0 commit comments

Comments
 (0)