Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues building on x86_64 #1126

Closed
liththedev opened this issue Jul 21, 2023 · 7 comments
Closed

Issues building on x86_64 #1126

liththedev opened this issue Jul 21, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@liththedev
Copy link

I get a bunch of errors when building (see below). I was able to get it to build by performing the following steps

  1. $ make medium
  2. $ cc -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -msse3 -mavx -c ggml.c -o ggml.o Note the addition of -mavx to the attempted compilation
  3. $make medium

As far as I understand it, something needs to be added to the Makefile to add -mavx for x86_64, but I am not familiar enough with the specifics to figure it out myself.

sidenote: It runs really slow, it took 366 seconds to process the 11 sec sample clip, but idk if that is due to compilation flags or other issues, I am still working figuring it out.

$ make medium
I whisper.cpp build info: 
I UNAME_S:  Linux
I UNAME_P:  unknown
I UNAME_M:  x86_64
I CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -msse3
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread
I LDFLAGS:  
I CC:       cc (Debian 12.2.0-14) 12.2.0
I CXX:      g++ (Debian 12.2.0-14) 12.2.0

cc  -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -msse3   -c ggml.c -o ggml.o
ggml.c:2204:15: error: unknown type name ‘__m128’
 2204 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) {
      |               ^~~~~~
ggml.c: In function ‘__sse_f16x4_load’:
ggml.c:2212:12: warning: implicit declaration of function ‘_mm_loadu_ps’ [-Wimplicit-function-declaration]
 2212 |     return _mm_loadu_ps(tmp);
      |            ^~~~~~~~~~~~
ggml.c: At top level:
ggml.c:2215:54: error: unknown type name ‘__m128’
 2215 | static inline void __sse_f16x4_store(ggml_fp16_t *x, __m128 y) {
      |                                                      ^~~~~~
ggml.c: In function ‘ggml_vec_dot_f32’:
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:2283:5: note: in expansion of macro ‘GGML_F32_VEC’
 2283 |     GGML_F32_VEC sum[GGML_F32_ARR] = { GGML_F32_VEC_ZERO };
      |     ^~~~~~~~~~~~
ggml.c:2158:28: warning: implicit declaration of function ‘_mm_setzero_ps’ [-Wimplicit-function-declaration]
 2158 | #define GGML_F32x4_ZERO    _mm_setzero_ps()
      |                            ^~~~~~~~~~~~~~
ggml.c:2190:29: note: in expansion of macro ‘GGML_F32x4_ZERO’
 2190 | #define GGML_F32_VEC_ZERO   GGML_F32x4_ZERO
      |                             ^~~~~~~~~~~~~~~
ggml.c:2283:40: note: in expansion of macro ‘GGML_F32_VEC_ZERO’
 2283 |     GGML_F32_VEC sum[GGML_F32_ARR] = { GGML_F32_VEC_ZERO };
      |                                        ^~~~~~~~~~~~~~~~~
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:2285:5: note: in expansion of macro ‘GGML_F32_VEC’
 2285 |     GGML_F32_VEC ax[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:2286:5: note: in expansion of macro ‘GGML_F32_VEC’
 2286 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2166:37: warning: implicit declaration of function ‘_mm_add_ps’ [-Wimplicit-function-declaration]
 2166 |     #define GGML_F32x4_FMA(a, b, c) _mm_add_ps(_mm_mul_ps(b, c), a)
      |                                     ^~~~~~~~~~
ggml.c:2194:29: note: in expansion of macro ‘GGML_F32x4_FMA’
 2194 | #define GGML_F32_VEC_FMA    GGML_F32x4_FMA
      |                             ^~~~~~~~~~~~~~
ggml.c:2293:22: note: in expansion of macro ‘GGML_F32_VEC_FMA’
 2293 |             sum[j] = GGML_F32_VEC_FMA(sum[j], ax[j], ay[j]);
      |                      ^~~~~~~~~~~~~~~~
ggml.c:2166:48: warning: implicit declaration of function ‘_mm_mul_ps’ [-Wimplicit-function-declaration]
 2166 |     #define GGML_F32x4_FMA(a, b, c) _mm_add_ps(_mm_mul_ps(b, c), a)
      |                                                ^~~~~~~~~~
ggml.c:2194:29: note: in expansion of macro ‘GGML_F32x4_FMA’
 2194 | #define GGML_F32_VEC_FMA    GGML_F32x4_FMA
      |                             ^~~~~~~~~~~~~~
ggml.c:2293:22: note: in expansion of macro ‘GGML_F32_VEC_FMA’
 2293 |             sum[j] = GGML_F32_VEC_FMA(sum[j], ax[j], ay[j]);
      |                      ^~~~~~~~~~~~~~~~
ggml.c:2184:11: error: unknown type name ‘__m128’
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
ggml.c:2197:29: note: in expansion of macro ‘GGML_F32x4_REDUCE’
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
ggml.c:2298:5: note: in expansion of macro ‘GGML_F32_VEC_REDUCE’
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
ggml.c:2184:23: warning: implicit declaration of function ‘_mm_hadd_ps’ [-Wimplicit-function-declaration]
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |                       ^~~~~~~~~~~
ggml.c:2197:29: note: in expansion of macro ‘GGML_F32x4_REDUCE’
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
ggml.c:2298:5: note: in expansion of macro ‘GGML_F32_VEC_REDUCE’
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
ggml.c:2185:11: warning: implicit declaration of function ‘_mm_cvtss_f32’ [-Wimplicit-function-declaration]
 2185 |     res = _mm_cvtss_f32(_mm_hadd_ps(t0, t0));                     \
      |           ^~~~~~~~~~~~~
ggml.c:2197:29: note: in expansion of macro ‘GGML_F32x4_REDUCE’
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
ggml.c:2298:5: note: in expansion of macro ‘GGML_F32_VEC_REDUCE’
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
ggml.c: In function ‘ggml_vec_dot_f16’:
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:2321:5: note: in expansion of macro ‘GGML_F16_VEC’
 2321 |     GGML_F16_VEC sum[GGML_F16_ARR] = { GGML_F16_VEC_ZERO };
      |     ^~~~~~~~~~~~
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:2323:5: note: in expansion of macro ‘GGML_F16_VEC’
 2323 |     GGML_F16_VEC ax[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:2324:5: note: in expansion of macro ‘GGML_F16_VEC’
 2324 |     GGML_F16_VEC ay[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2184:11: error: unknown type name ‘__m128’
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
ggml.c:2234:33: note: in expansion of macro ‘GGML_F32x4_REDUCE’
 2234 | #define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
      |                                 ^~~~~~~~~~~~~~~~~
ggml.c:2244:38: note: in expansion of macro ‘GGML_F32Cx4_REDUCE’
 2244 | #define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
      |                                      ^~~~~~~~~~~~~~~~~~
ggml.c:2336:5: note: in expansion of macro ‘GGML_F16_VEC_REDUCE’
 2336 |     GGML_F16_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
ggml.c: In function ‘ggml_vec_dot_f16_unroll’:
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:3359:5: note: in expansion of macro ‘GGML_F16_VEC’
 3359 |     GGML_F16_VEC sum[GGML_VEC_DOT_UNROLL][GGML_F16_ARR] = { { GGML_F16_VEC_ZERO } };
      |     ^~~~~~~~~~~~
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:3361:5: note: in expansion of macro ‘GGML_F16_VEC’
 3361 |     GGML_F16_VEC ax[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2226:33: error: unknown type name ‘__m128’
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
ggml.c:2236:38: note: in expansion of macro ‘GGML_F32Cx4’
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
ggml.c:3362:5: note: in expansion of macro ‘GGML_F16_VEC’
 3362 |     GGML_F16_VEC ay[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2184:11: error: unknown type name ‘__m128’
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
ggml.c:2234:33: note: in expansion of macro ‘GGML_F32x4_REDUCE’
 2234 | #define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
      |                                 ^~~~~~~~~~~~~~~~~
ggml.c:2244:38: note: in expansion of macro ‘GGML_F32Cx4_REDUCE’
 2244 | #define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
      |                                      ^~~~~~~~~~~~~~~~~~
ggml.c:3378:9: note: in expansion of macro ‘GGML_F16_VEC_REDUCE’
 3378 |         GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
      |         ^~~~~~~~~~~~~~~~~~~
ggml.c: In function ‘ggml_vec_mad_f32’:
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:3404:5: note: in expansion of macro ‘GGML_F32_VEC’
 3404 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |     ^~~~~~~~~~~~
ggml.c:2159:28: warning: implicit declaration of function ‘_mm_set1_ps’ [-Wimplicit-function-declaration]
 2159 | #define GGML_F32x4_SET1(x) _mm_set1_ps(x)
      |                            ^~~~~~~~~~~
ggml.c:2191:29: note: in expansion of macro ‘GGML_F32x4_SET1’
 2191 | #define GGML_F32_VEC_SET1   GGML_F32x4_SET1
      |                             ^~~~~~~~~~~~~~~
ggml.c:3404:23: note: in expansion of macro ‘GGML_F32_VEC_SET1’
 3404 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |                       ^~~~~~~~~~~~~~~~~
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:3406:5: note: in expansion of macro ‘GGML_F32_VEC’
 3406 |     GGML_F32_VEC ax[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:3407:5: note: in expansion of macro ‘GGML_F32_VEC’
 3407 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
ggml.c:2161:28: warning: implicit declaration of function ‘_mm_storeu_ps’ [-Wimplicit-function-declaration]
 2161 | #define GGML_F32x4_STORE   _mm_storeu_ps
      |                            ^~~~~~~~~~~~~
ggml.c:2193:29: note: in expansion of macro ‘GGML_F32x4_STORE’
 2193 | #define GGML_F32_VEC_STORE  GGML_F32x4_STORE
      |                             ^~~~~~~~~~~~~~~~
ggml.c:3415:13: note: in expansion of macro ‘GGML_F32_VEC_STORE’
 3415 |             GGML_F32_VEC_STORE(y + i + j*GGML_F32_EPR, ay[j]);
      |             ^~~~~~~~~~~~~~~~~~
ggml.c: In function ‘ggml_vec_scale_f32’:
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:3436:5: note: in expansion of macro ‘GGML_F32_VEC’
 3436 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |     ^~~~~~~~~~~~
ggml.c:2157:28: error: unknown type name ‘__m128’
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
ggml.c:2189:29: note: in expansion of macro ‘GGML_F32x4’
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
ggml.c:3438:5: note: in expansion of macro ‘GGML_F32_VEC’
 3438 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
      ```
      
@liththedev
Copy link
Author

cpuinfo, if that is helpful

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 1
cpu cores       : 6
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 1
cpu cores       : 6
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 2
cpu cores       : 6
apicid          : 4
initial apicid  : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 2
cpu cores       : 6
apicid          : 5
initial apicid  : 5
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 6
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 3
cpu cores       : 6
apicid          : 6
initial apicid  : 6
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 3
cpu cores       : 6
apicid          : 7
initial apicid  : 7
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 8
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 4
cpu cores       : 6
apicid          : 8
initial apicid  : 8
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 9
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 4
cpu cores       : 6
apicid          : 9
initial apicid  : 9
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 10
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 5
cpu cores       : 6
apicid          : 10
initial apicid  : 10
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 11
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
stepping        : 7
microcode       : 0xffffffff
cpu MHz         : 3201.981
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 5
cpu cores       : 6
apicid          : 11
initial apicid  : 11
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp xsaveopt flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6403.96
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

@randaz81
Copy link

randaz81 commented Jul 26, 2023

I got the same issue: error: unknown type name '__m128' .
I think that this issue was not happening on my CI about two weeks ago but I haven't done a git bisect to verify this.

-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.41.0") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/build
[1/12] Building C object CMakeFiles/whisper.dir/ggml.c.o
FAILED: CMakeFiles/whisper.dir/ggml.c.o 
/usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-cc  -I/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda3/envs/test/include             -Wall                                       -Wextra                                     -Wpedantic                                  -Wshadow                                    -Wcast-qual                                 -Wstrict-prototypes                         -Wpointer-arith                             -Wno-unused-function                     -Werror=vla -O3 -DNDEBUG -MD -MT CMakeFiles/whisper.dir/ggml.c.o -MF CMakeFiles/whisper.dir/ggml.c.o.d -o CMakeFiles/whisper.dir/ggml.c.o -c /home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'quantize_row_q8_0':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:1143:15: warning: unused variable 'nb' [-Wunused-variable]
 1143 |     const int nb = k / QK8_0;
      |               ^~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'quantize_row_q8_1':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:1338:15: warning: unused variable 'nb' [-Wunused-variable]
 1338 |     const int nb = k / QK8_1;
      |               ^~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: At top level:
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2204:15: error: unknown type name '__m128'
 2204 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) {
      |               ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function '__sse_f16x4_load':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2212:12: warning: implicit declaration of function '_mm_loadu_ps' [-Wimplicit-function-declaration]
 2212 |     return _mm_loadu_ps(tmp);
      |            ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: At top level:
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2215:54: error: unknown type name '__m128'; did you mean '__int128'?
 2215 | static inline void __sse_f16x4_store(ggml_fp16_t *x, __m128 y) {
      |                                                      ^~~~~~
      |                                                      __int128
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'ggml_vec_dot_f32':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2283:5: note: in expansion of macro 'GGML_F32_VEC'
 2283 |     GGML_F32_VEC sum[GGML_F32_ARR] = { GGML_F32_VEC_ZERO };
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2158:28: warning: implicit declaration of function '_mm_setzero_ps' [-Wimplicit-function-declaration]
 2158 | #define GGML_F32x4_ZERO    _mm_setzero_ps()
      |                            ^~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2190:29: note: in expansion of macro 'GGML_F32x4_ZERO'
 2190 | #define GGML_F32_VEC_ZERO   GGML_F32x4_ZERO
      |                             ^~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2283:40: note: in expansion of macro 'GGML_F32_VEC_ZERO'
 2283 |     GGML_F32_VEC sum[GGML_F32_ARR] = { GGML_F32_VEC_ZERO };
      |                                        ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2285:5: note: in expansion of macro 'GGML_F32_VEC'
 2285 |     GGML_F32_VEC ax[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2286:5: note: in expansion of macro 'GGML_F32_VEC'
 2286 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2166:37: warning: implicit declaration of function '_mm_add_ps' [-Wimplicit-function-declaration]
 2166 |     #define GGML_F32x4_FMA(a, b, c) _mm_add_ps(_mm_mul_ps(b, c), a)
      |                                     ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2194:29: note: in expansion of macro 'GGML_F32x4_FMA'
 2194 | #define GGML_F32_VEC_FMA    GGML_F32x4_FMA
      |                             ^~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2293:22: note: in expansion of macro 'GGML_F32_VEC_FMA'
 2293 |             sum[j] = GGML_F32_VEC_FMA(sum[j], ax[j], ay[j]);
      |                      ^~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2166:48: warning: implicit declaration of function '_mm_mul_ps' [-Wimplicit-function-declaration]
 2166 |     #define GGML_F32x4_FMA(a, b, c) _mm_add_ps(_mm_mul_ps(b, c), a)
      |                                                ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2194:29: note: in expansion of macro 'GGML_F32x4_FMA'
 2194 | #define GGML_F32_VEC_FMA    GGML_F32x4_FMA
      |                             ^~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2293:22: note: in expansion of macro 'GGML_F32_VEC_FMA'
 2293 |             sum[j] = GGML_F32_VEC_FMA(sum[j], ax[j], ay[j]);
      |                      ^~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2184:11: error: unknown type name '__m128'
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2197:29: note: in expansion of macro 'GGML_F32x4_REDUCE'
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2298:5: note: in expansion of macro 'GGML_F32_VEC_REDUCE'
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2184:23: warning: implicit declaration of function '_mm_hadd_ps' [-Wimplicit-function-declaration]
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |                       ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2197:29: note: in expansion of macro 'GGML_F32x4_REDUCE'
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2298:5: note: in expansion of macro 'GGML_F32_VEC_REDUCE'
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2185:11: warning: implicit declaration of function '_mm_cvtss_f32' [-Wimplicit-function-declaration]
 2185 |     res = _mm_cvtss_f32(_mm_hadd_ps(t0, t0));                     \
      |           ^~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2197:29: note: in expansion of macro 'GGML_F32x4_REDUCE'
 2197 | #define GGML_F32_VEC_REDUCE GGML_F32x4_REDUCE
      |                             ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2298:5: note: in expansion of macro 'GGML_F32_VEC_REDUCE'
 2298 |     GGML_F32_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'ggml_vec_dot_f16':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2321:5: note: in expansion of macro 'GGML_F16_VEC'
 2321 |     GGML_F16_VEC sum[GGML_F16_ARR] = { GGML_F16_VEC_ZERO };
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2323:5: note: in expansion of macro 'GGML_F16_VEC'
 2323 |     GGML_F16_VEC ax[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2324:5: note: in expansion of macro 'GGML_F16_VEC'
 2324 |     GGML_F16_VEC ay[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2184:11: error: unknown type name '__m128'
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2234:33: note: in expansion of macro 'GGML_F32x4_REDUCE'
 2234 | #define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
      |                                 ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2244:38: note: in expansion of macro 'GGML_F32Cx4_REDUCE'
 2244 | #define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
      |                                      ^~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2336:5: note: in expansion of macro 'GGML_F16_VEC_REDUCE'
 2336 |     GGML_F16_VEC_REDUCE(sumf, sum);
      |     ^~~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'ggml_vec_dot_f16_unroll':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3359:5: note: in expansion of macro 'GGML_F16_VEC'
 3359 |     GGML_F16_VEC sum[GGML_VEC_DOT_UNROLL][GGML_F16_ARR] = { { GGML_F16_VEC_ZERO } };
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3361:5: note: in expansion of macro 'GGML_F16_VEC'
 3361 |     GGML_F16_VEC ax[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2226:33: error: unknown type name '__m128'; did you mean '__int128'?
 2226 | #define GGML_F32Cx4             __m128
      |                                 ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2236:38: note: in expansion of macro 'GGML_F32Cx4'
 2236 | #define GGML_F16_VEC                 GGML_F32Cx4
      |                                      ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3362:5: note: in expansion of macro 'GGML_F16_VEC'
 3362 |     GGML_F16_VEC ay[GGML_F16_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2184:11: error: unknown type name '__m128'
 2184 |     const __m128 t0 = _mm_hadd_ps(x[0], x[0]);                    \
      |           ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2234:33: note: in expansion of macro 'GGML_F32x4_REDUCE'
 2234 | #define GGML_F32Cx4_REDUCE      GGML_F32x4_REDUCE
      |                                 ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2244:38: note: in expansion of macro 'GGML_F32Cx4_REDUCE'
 2244 | #define GGML_F16_VEC_REDUCE          GGML_F32Cx4_REDUCE
      |                                      ^~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3378:9: note: in expansion of macro 'GGML_F16_VEC_REDUCE'
 3378 |         GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
      |         ^~~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'ggml_vec_mad_f32':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3404:5: note: in expansion of macro 'GGML_F32_VEC'
 3404 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2159:28: warning: implicit declaration of function '_mm_set1_ps' [-Wimplicit-function-declaration]
 2159 | #define GGML_F32x4_SET1(x) _mm_set1_ps(x)
      |                            ^~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2191:29: note: in expansion of macro 'GGML_F32x4_SET1'
 2191 | #define GGML_F32_VEC_SET1   GGML_F32x4_SET1
      |                             ^~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3404:23: note: in expansion of macro 'GGML_F32_VEC_SET1'
 3404 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |                       ^~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3406:5: note: in expansion of macro 'GGML_F32_VEC'
 3406 |     GGML_F32_VEC ax[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3407:5: note: in expansion of macro 'GGML_F32_VEC'
 3407 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2161:28: warning: implicit declaration of function '_mm_storeu_ps' [-Wimplicit-function-declaration]
 2161 | #define GGML_F32x4_STORE   _mm_storeu_ps
      |                            ^~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2193:29: note: in expansion of macro 'GGML_F32x4_STORE'
 2193 | #define GGML_F32_VEC_STORE  GGML_F32x4_STORE
      |                             ^~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3415:13: note: in expansion of macro 'GGML_F32_VEC_STORE'
 3415 |             GGML_F32_VEC_STORE(y + i + j*GGML_F32_EPR, ay[j]);
      |             ^~~~~~~~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c: In function 'ggml_vec_scale_f32':
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3436:5: note: in expansion of macro 'GGML_F32_VEC'
 3436 |     GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
      |     ^~~~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2157:28: error: unknown type name '__m128'; did you mean '__int128'?
 2157 | #define GGML_F32x4         __m128
      |                            ^~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:2189:29: note: in expansion of macro 'GGML_F32x4'
 2189 | #define GGML_F32_VEC        GGML_F32x4
      |                             ^~~~~~~~~~
/home/runner/work/yarp-device-speechTranscription-whisper/yarp-device-speechTranscription-whisper/whispercpp/ggml.c:3438:5: note: in expansion of macro 'GGML_F32_VEC'
 3438 |     GGML_F32_VEC ay[GGML_F32_ARR];
      |     ^~~~~~~~~~~~
[2/12] Building CXX object examples/CMakeFiles/common.dir/common.cpp.o
[3/12] Building CXX object CMakeFiles/whisper.dir/whisper.cpp.o
ninja: build stopped: subcommand failed.
Error: Process completed with exit code 1.

@anonheregg
Copy link

Anyone figured this out? I am too getting this error!

@liththedev
Copy link
Author

Anyone figured this out? I am too getting this error!

workaround:

  1. attempt to build i.e. make {model}
  2. copy the line that says something like cc -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -msse3 -c ggml.c -o ggml.o
  3. add -mavx to the command and execute it i.e. cc -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -msse3 -mavx -c ggml.c -o ggml.o
  4. try building again make {model}. make will recognize that ggml.o is already up to date, and just build the rest

@LinArcX
Copy link

LinArcX commented Aug 5, 2023

I have the same issue. the workaround suggested by @liththedev works very well. but I wanted to know what is the reason.

@lachesis
Copy link
Contributor

lachesis commented Aug 6, 2023

I had the same issue when running against an ancient processor (E5-2670v1) with SSE3 and AVX but not AVX2. Here are my CPU flags fwiw:

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust xsaveopt arat umip md_clear arch_capabilities

I applied the following patch to the Makefile, then my system built correctly.

diff --git a/Makefile b/Makefile
index 37ca382..67796c7 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,10 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
                        CFLAGS += -mavx2
                endif
        else ifeq ($(UNAME_S),Linux)
+               AVX_M := $(shell grep "avx " /proc/cpuinfo)
+               ifneq (,$(findstring avx,$(AVX_M)))
+                       CFLAGS += -mavx
+               endif
                AVX2_M := $(shell grep "avx2 " /proc/cpuinfo)
                ifneq (,$(findstring avx2,$(AVX2_M)))
                        CFLAGS += -mavx2

Likely the correct PR would involve a change to the cmake setup to recognize this flag, then the makefiles would need to be regenerated.

lachesis added a commit to lachesis/whisper.cpp that referenced this issue Aug 6, 2023
ggerganov added a commit that referenced this issue Aug 25, 2023
e.g. ancient CPU E5-2670 (v1)

See issue #1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this issue Oct 24, 2023
e.g. ancient CPU E5-2670 (v1)

See issue ggerganov#1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this issue Oct 24, 2023
e.g. ancient CPU E5-2670 (v1)

See issue ggerganov#1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@bobqianic
Copy link
Collaborator

Issue was solved in #1162

@bobqianic bobqianic added bug Something isn't working solution This issue contains a potential solution labels Oct 24, 2023
vonstring pushed a commit to vonstring/whisper.cpp that referenced this issue Nov 7, 2023
e.g. ancient CPU E5-2670 (v1)

See issue ggerganov#1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@bobqianic bobqianic removed the solution This issue contains a potential solution label Nov 9, 2023
landtanin pushed a commit to landtanin/whisper.cpp that referenced this issue Dec 16, 2023
e.g. ancient CPU E5-2670 (v1)

See issue ggerganov#1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
iThalay pushed a commit to iThalay/whisper.cpp that referenced this issue Sep 23, 2024
e.g. ancient CPU E5-2670 (v1)

See issue ggerganov#1126

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants