llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Compile bug: llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:80:54:error '_mm256_set_m128i' was not declared in this scope

Open zhangyangniubi opened this issue 11 months ago • 4 comments

Git commit

master

Operating systems

Linux

GGML backends

CPU

Problem description & steps to reproduce

linux system build project occur

First Bad Commit

No response

Compile command

cmake -B build
cmake --build bulid --config Release

Relevant log output

/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp: In function ‘void ggml_gemm_q4_0_8x8_q8_0(int, float*, size_t, const void*, const void*, int, int)’:
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:80:54: error: ‘_mm256_set_m128i’ was not declared in this scope
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:2610:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:80:54: note: suggested alternative: ‘_mm256_set_epi8’
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:2610:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:80:54: error: ‘_mm256_set_m128i’ was not declared in this scope
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:2804:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:80:54: note: suggested alternative: ‘_mm256_set_epi8’
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/warehouse/llmfn/llama.cpp-master/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:2804:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
ggml/src/CMakeFiles/ggml-cpu.dir/build.make:88: recipe for target 'ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o' failed
make[2]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  9%] Built target xxhash
CMakeFiles/Makefile2:1085: recipe for target 'ggml/src/CMakeFiles/ggml-cpu.dir/all' failed
make[1]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

zhangyangniubi avatar Jan 24 '25 06:01 zhangyangniubi

see same problem , following same steps for CPU build, CUDA seems to work.

nvzflow avatar Jan 30 '25 16:01 nvzflow

Just encountered the same problem, u need to update the local gcc/g++ to version 9.4 and it will compile without problems

ylxy123 avatar Feb 10 '25 01:02 ylxy123

@zhangyangniubi pls . do you resolve this problem ?

vudiy avatar Mar 06 '25 09:03 vudiy

I encountered a similar issue, could you help me solve it?

everythingez avatar Apr 10 '25 04:04 everythingez

I had the same problem, as @ylxy123 mentioned here upgrading the gcc to version above 9 (13 in my case) resolved the problem. I assume the project developed and tested with newer compilers

vklb avatar May 20 '25 14:05 vklb

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 04 '25 01:07 github-actions[bot]