Build error with GCC12: /usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:29182:1: error: inlining failed in call to ‘always_inline’ ‘vfmaq_f16’: target specific option mismatch
denverdino opened this issue · comments
Li Yi commented
When I build Docker image with Apple M1 Silicon. The base image includes with GCC 12.
And I got some build error as following.
In file included from /ctransformers/models/ggml/ggml.c:274:
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h: In function ‘ggml_vec_dot_f16’:
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:29182:1: error: inlining failed in call to ‘always_inline’ ‘vfmaq_f16’: target specific option mismatch
29182 | vfmaq_f16 (float16x8_t __a, float16x8_t __b, float16x8_t __c)
| ^~~~~~~~~
/ctransformers/models/ggml/ggml.c:1884:37: note: called from here
1884 | #define GGML_F16x8_FMA(a, b, c) vfmaq_f16(a, b, c)
| ^~~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:1911:41: note: in expansion of macro ‘GGML_F16x8_FMA’
1911 | #define GGML_F16_VEC_FMA GGML_F16x8_FMA
| ^~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:2408:22: note: in expansion of macro ‘GGML_F16_VEC_FMA’
2408 | sum[j] = GGML_F16_VEC_FMA(sum[j], ax[j], ay[j]);
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:29182:1: error: inlining failed in call to ‘always_inline’ ‘vfmaq_f16’: target specific option mismatch
29182 | vfmaq_f16 (float16x8_t __a, float16x8_t __b, float16x8_t __c)
| ^~~~~~~~~
/ctransformers/models/ggml/ggml.c:1884:37: note: called from here
1884 | #define GGML_F16x8_FMA(a, b, c) vfmaq_f16(a, b, c)
| ^~~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:1911:41: note: in expansion of macro ‘GGML_F16x8_FMA’
1911 | #define GGML_F16_VEC_FMA GGML_F16x8_FMA
| ^~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:2408:22: note: in expansion of macro ‘GGML_F16_VEC_FMA’
2408 | sum[j] = GGML_F16_VEC_FMA(sum[j], ax[j], ay[j]);
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:28760:1: error: inlining failed in call to ‘always_inline’ ‘vaddq_f16’: target specific option mismatch
28760 | vaddq_f16 (float16x8_t __a, float16x8_t __b)
| ^~~~~~~~~
/ctransformers/models/ggml/ggml.c:1891:20: note: called from here
1891 | x[i] = vaddq_f16(x[i], x[offset+i]); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:1914:41: note: in expansion of macro ‘GGML_F16x8_REDUCE’
1914 | #define GGML_F16_VEC_REDUCE GGML_F16x8_REDUCE
| ^~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:2413:5: note: in expansion of macro ‘GGML_F16_VEC_REDUCE’
2413 | GGML_F16_VEC_REDUCE(sumf, sum);
| ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:28760:1: error: inlining failed in call to ‘always_inline’ ‘vaddq_f16’: target specific option mismatch
28760 | vaddq_f16 (float16x8_t __a, float16x8_t __b)
| ^~~~~~~~~
/ctransformers/models/ggml/ggml.c:1895:20: note: called from here
1895 | x[i] = vaddq_f16(x[i], x[offset+i]); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:1914:41: note: in expansion of macro ‘GGML_F16x8_REDUCE’
1914 | #define GGML_F16_VEC_REDUCE GGML_F16x8_REDUCE
| ^~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:2413:5: note: in expansion of macro ‘GGML_F16_VEC_REDUCE’
2413 | GGML_F16_VEC_REDUCE(sumf, sum);
| ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/aarch64-linux-gnu/12/include/arm_neon.h:28760:1: error: inlining failed in call to ‘always_inline’ ‘vaddq_f16’: target specific option mismatch
28760 | vaddq_f16 (float16x8_t __a, float16x8_t __b)
| ^~~~~~~~~
/ctransformers/models/ggml/ggml.c:1899:20: note: called from here
1899 | x[i] = vaddq_f16(x[i], x[offset+i]); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:1914:41: note: in expansion of macro ‘GGML_F16x8_REDUCE’
1914 | #define GGML_F16_VEC_REDUCE GGML_F16x8_REDUCE
| ^~~~~~~~~~~~~~~~~
/ctransformers/models/ggml/ggml.c:2413:5: note: in expansion of macro ‘GGML_F16_VEC_REDUCE’
2413 | GGML_F16_VEC_REDUCE(sumf, sum);
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ctransformers.dir/build.make:90: CMakeFiles/ctransformers.dir/models/ggml/ggml.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ctransformers.dir/all] Error 2
It is similar to serge-chat/serge#64
And after I roll back the GCC to GCC11, it works