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

Compilation error with make on Linux Lite related to AVX. #605

Closed
FSSRepo opened this issue Nov 11, 2023 · 1 comment
Closed

Compilation error with make on Linux Lite related to AVX. #605

FSSRepo opened this issue Nov 11, 2023 · 1 comment

Comments

@FSSRepo
Copy link
Collaborator

FSSRepo commented Nov 11, 2023

I am experiencing this error on Linux Lite using the latest version of GCC.

~/ggml/make
Consolidate compiler generated dependencies of target ggml
[ 25%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:99,
                 from /home/steward/stable-diffusion.cpp/ggml/src/ggml.c:339:
/home/steward/stable-diffusion.cpp/ggml/src/ggml.c: In function ‘ggml_vec_dot_q4_0_q8_0’:
/usr/lib/gcc/x86_64-linux-gnu/11/include/fmaintrin.h:63:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch
   63 | _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
      | ^~~~~~~~~~~~~~~
/home/steward/stable-diffusion.cpp/ggml/src/ggml.c:2583:15: note: called from here
 2583 |         acc = _mm256_fmadd_ps( d, q, acc );
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:99,
                 from /home/steward/stable-diffusion.cpp/ggml/src/ggml.c:339:
/usr/lib/gcc/x86_64-linux-gnu/11/include/fmaintrin.h:63:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch
   63 | _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
      | ^~~~~~~~~~~~~~~
/home/steward/stable-diffusion.cpp/ggml/src/ggml.c:2583:15: note: called from here
 2583 |         acc = _mm256_fmadd_ps( d, q, acc );
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:99,
                 from /home/steward/stable-diffusion.cpp/ggml/src/ggml.c:339:
/usr/lib/gcc/x86_64-linux-gnu/11/include/fmaintrin.h:63:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch
   63 | _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
      | ^~~~~~~~~~~~~~~
/home/steward/stable-diffusion.cpp/ggml/src/ggml.c:2583:15: note: called from here
 2583 |         acc = _mm256_fmadd_ps( d, q, acc );
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:99,
                 from /home/steward/stable-diffusion.cpp/ggml/src/ggml.c:339:
/usr/lib/gcc/x86_64-linux-gnu/11/include/fmaintrin.h:63:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch
   63 | _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
      | ^~~~~~~~~~~~~~~
/home/steward/stable-diffusion.cpp/ggml/src/ggml.c:2583:15: note: called from here
 2583 |         acc = _mm256_fmadd_ps( d, q, acc );
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [ggml/src/CMakeFiles/ggml.dir/build.make:76: ggml/src/CMakeFiles/ggml.dir/ggml.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: ggml/src/CMakeFiles/ggml.dir/all] Error 2

gcc

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

make

GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http:https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

uname a

uname -a
Linux steward-VirtualBox 5.15.0-82-generic #91-Ubuntu SMP Mon Aug 14 14:14:14 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
@FSSRepo FSSRepo changed the title Compilation error with make on Linux Lite. Compilation error with make on Linux Lite related to k-quants. Nov 11, 2023
@FSSRepo FSSRepo changed the title Compilation error with make on Linux Lite related to k-quants. Compilation error with make on Linux Lite related to AVX. Nov 11, 2023
@FSSRepo FSSRepo closed this as completed Nov 11, 2023
@limitmhw
Copy link

limitmhw commented Nov 15, 2023

the same issue

gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2

add set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=znver1")

I can compile success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants