Browse Source

ggml : try fix ppc64 (whisper/0)

Georgi Gerganov 1 year ago
parent
commit
c3c88f296a
2 changed files with 3 additions and 1 deletions
  1. 1 1
      ggml-quants.c
  2. 2 0
      ggml.c

+ 1 - 1
ggml-quants.c

@@ -11425,7 +11425,7 @@ void ggml_vec_dot_iq1_s_q8_K  (int n, float * restrict s, size_t bs, const void
 
             vector signed short qxh = (vector signed short)vec_sld(vec_splats(qh[1]), vec_splats(qh[0]), 8);
             qh += 2;
-            vector bool short vsel = vec_cmpge(qxh, (vector signed short)v0);
+            vector __bool short vsel = vec_cmpge(qxh, (vector signed short)v0);
 
             vector signed short q8ysum = vec_sel((vector signed short)vec_xor((vector unsigned short)q8ysums, vsign), q8ysums, vsel);
 

+ 2 - 0
ggml.c

@@ -1306,6 +1306,8 @@ static inline void __avx_f32cx8_store(ggml_fp16_t *x, __m256 y) {
 #define GGML_F16_VEC_ZERO   GGML_F32x4_ZERO
 #define GGML_F16_VEC_SET1   GGML_F32x4_SET1
 #define GGML_F16_VEC_FMA    GGML_F32x4_FMA
+#define GGML_F16_VEC_ADD    GGML_F32x4_ADD
+#define GGML_F16_VEC_MUL    GGML_F32x4_MUL
 #define GGML_F16_VEC_REDUCE GGML_F32x4_REDUCE
 // Use vec_xl, not vec_ld, in case the load address is not aligned.
 #define GGML_F16_VEC_LOAD(p, i) (i & 0x1) ?                   \