whisper.cpp: Make failure - error: inlining failed in call to always_inline

Thanks for releasing this software, I’m trying to build this in a Debian system but make is failing. The Compiler versions are

❯ cc --version
cc (Debian 8.3.0-6) 8.3.0

❯ c++ --version
c++ (Debian 8.3.0-6) 8.3.0

When trying make base.en in the master branch the following error happens

❯ make base.en
cc  -I.              -O3 -std=c11   -pthread -mavx   -c ggml.c -o ggml.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
ggml.c: In function ‘ggml_vec_mad_f16’:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1024:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 24), _mm256_cvtps_ph(y3, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1023:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 16), _mm256_cvtps_ph(y2, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1022:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 8 ), _mm256_cvtps_ph(y1, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1021:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 0 ), _mm256_cvtps_ph(y0, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1014:14: note: called from here
         x3 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 24)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1013:14: note: called from here
         x2 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 16)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1012:14: note: called from here
         x1 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 8 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1011:14: note: called from here
         x0 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 0 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1009:14: note: called from here
         y3 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 24)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1008:14: note: called from here
         y2 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 16)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1007:14: note: called from here
         y1 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 8 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1006:14: note: called from here
         y0 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 0 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1006:14: note: called from here
         y0 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 0 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1007:14: note: called from here
         y1 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 8 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1008:14: note: called from here
         y2 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 16)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1009:14: note: called from here
         y3 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(y + i + 24)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1011:14: note: called from here
         x0 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 0 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1012:14: note: called from here
         x1 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 8 )));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1013:14: note: called from here
         x2 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 16)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
 _mm256_cvtph_ps (__m128i __A)
 ^~~~~~~~~~~~~~~
ggml.c:1014:14: note: called from here
         x3 = _mm256_cvtph_ps(_mm_loadu_si128((__m128i*)(x + i + 24)));
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1021:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 0 ), _mm256_cvtps_ph(y0, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1022:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 8 ), _mm256_cvtps_ph(y1, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1023:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 16), _mm256_cvtps_ph(y2, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:99,
                 from ggml.c:128:
/usr/lib/gcc/x86_64-linux-gnu/8/include/f16cintrin.h:73:1: error: inlining failed in call to always_inline ‘_mm256_cvtps_ph’: target specific option mismatch
 _mm256_cvtps_ph (__m256 __A, const int __I)
 ^~~~~~~~~~~~~~~
ggml.c:1024:9: note: called from here
         _mm_storeu_si128((__m128i*)(y + i + 24), _mm256_cvtps_ph(y3, 0));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:127: ggml.o] Error 1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

I commented out the avx lines in the makefile, like this:

diff --git a/Makefile b/Makefile
index 07c91c1..b89d835 100644
--- a/Makefile
+++ b/Makefile
@@ -62,10 +62,10 @@ ifeq ($(UNAME_M),x86_64)
								endif
				endif
				ifeq ($(UNAME_S),Linux)
-               AVX1_M := $(shell grep "avx " /proc/cpuinfo)
-               ifneq (,$(findstring avx,$(AVX1_M)))
-                       CFLAGS += -mavx
-               endif
+               #AVX1_M := $(shell grep "avx " /proc/cpuinfo)
+               #ifneq (,$(findstring avx,$(AVX1_M)))
+               #       CFLAGS += -mavx
+               #endif
								AVX2_M := $(shell grep "avx2 " /proc/cpuinfo)
								ifneq (,$(findstring avx2,$(AVX2_M)))
												CFLAGS += -mavx2

and that made it compile under Debian for me.

@aryker This CPU has AVX but does not have F16C. This combination is currently not supported in ggml.c. The Makefile has to be adjusted to not add the -mavx flag if F16C is not available:

https://github.com/ggerganov/whisper.cpp/blob/4c1fe0c813135fbccc487b85f024e633a911aeba/Makefile#L53-L104

ok this starts to get interesting … dmidecode does NOT show AVX support !?

I found this thread… even though its about FreeBSD, its exactly what I’m seeing (https://www.dslreports.com/forum/r25939252-AVX-on-i7-2600k-and-ASUS-P8Z68-V-PRO)

dmidecode -tprocessor
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
	Socket Designation: LGA1155
	Type: Central Processor
	Family: Core 2 Duo
	Manufacturer: Intel            
	ID: A7 06 02 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 42, Stepping 7
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz       
	Voltage: 1.0 V
	External Clock: 100 MHz
	Max Speed: 3800 MHz
	Current Speed: 3439 MHz
	Status: Populated, Enabled
	Upgrade: Other
	L1 Cache Handle: 0x0005
	L2 Cache Handle: 0x0006
	L3 Cache Handle: 0x0007
	Serial Number: To Be Filled By O.E.M.
	Asset Tag: To Be Filled By O.E.M.
	Part Number: To Be Filled By O.E.M.
	Core Count: 4
	Core Enabled: 1
	Thread Count: 2
	Characteristics:
		64-bit capable