llama.cpp
llama.cpp copied to clipboard
Compile errors with AVX disabled
Trying to compile for older Intel XEON CPUs, and they don't support the AVX instructions. However, if I turn off LLAMA_AVX and/or LLAMA_AVX2, I get these errors (as of commit eb17a02):
/home/user/llama.cpp/ggml.c: In function ‘bytesFromNibbles’:
/home/user/llama.cpp/ggml.c:470:19: warning: implicit declaration of function ‘_mm_loadu_si64’; did you mean ‘_mm_loadl_epi64’? [-Wimplicit-function-declaration]
__m128i tmp = _mm_loadu_si64( ( const __m128i* )rsi );
^~~~~~~~~~~~~~
_mm_loadl_epi64
/home/user/llama.cpp/ggml.c:470:19: error: incompatible types when initializing type ‘__m128i {aka __vector(2) long long int}’ using type ‘int’
/home/user/llama.cpp/ggml.c: In function ‘quantize_row_q4_1’:
/home/user/llama.cpp/ggml.c:930:27: warning: unused variable ‘y’ [-Wunused-variable]
block_q4_1 * restrict y = vy;
^
/home/user/llama.cpp/ggml.c:928:15: warning: unused variable ‘nb’ [-Wunused-variable]
const int nb = k / QK4_1;
^~
/home/user/llama.cpp/ggml.c: In function ‘ggml_vec_dot_q4_0’:
/home/user/llama.cpp/ggml.c:2425:40: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’? [-Wimplicit-function-declaration]
__m256 p = _mm256_cvtepi32_ps( _mm256_set_m128i( i32[0], i32[1] ));
^~~~~~~~~~~~~~~~
_mm256_set_epi8
/home/user/llama.cpp/ggml.c:2425:40: error: incompatible type for argument 1 of ‘_mm256_cvtepi32_ps’
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
from /home/user/llama.cpp/ggml.c:186:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:454:1: note: expected ‘__m256i {aka __vector(4) long long int}’ but argument is of type ‘int’
_mm256_cvtepi32_ps (__m256i __A)
^~~~~~~~~~~~~~~~~~
/home/user/llama.cpp/ggml.c: In function ‘ggml_vec_dot_q4_0_q8_0’:
/home/user/llama.cpp/ggml.c:2892:40: error: incompatible type for argument 1 of ‘_mm256_cvtepi32_ps’
__m256 p = _mm256_cvtepi32_ps( _mm256_set_m128i( i32[0], i32[1] ));
^~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:41:0,
from /home/user/llama.cpp/ggml.c:186:
/usr/lib/gcc/x86_64-linux-gnu/7/include/avxintrin.h:454:1: note: expected ‘__m256i {aka __vector(4) long long int}’ but argument is of type ‘int’
_mm256_cvtepi32_ps (__m256i __A)