-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
make is error ( k_quants.c) #1927
Comments
try upgrading gcc/g++ |
|
Did you manage to get it to work? |
My pal GPT says the following works too if your intrinsics library does not contain static inline __m256i my_mm256_set_m128i(__m128i hi, __m128i lo) {
__m256i val = _mm256_castsi128_si256(lo);
val = _mm256_insertf128_si256(val, hi, 1);
return val;
} then replace calls to This let me compile and run on an old version of Debian with GCC-7.5. |
It works, thanks. |
You could also modify the code, adding a check for gcc versions #include <immintrin.h>
#if <gcc version lt 8?>
static inline __m256i __mm256_set_m128i(__m128i hi, __m128i lo) {
__m256i val = _mm256_castsi128_si256(lo);
val = _mm256_insertf128_si256(val, hi, 1);
return val;
}
#endif |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
llama.cpp$ make
I llama.cpp build info:
I UNAME_S: Linux
I UNAME_P: x86_64
I UNAME_M: x86_64
I CFLAGS: -I. -O3 -std=c11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -pthread -march=native -mtune=native -DGGML_USE_K_QUANTS
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native -DGGML_USE_K_QUANTS
I LDFLAGS:
I CC: cc (Ubuntu 7.5.0-3ubuntu1
16.04) 7.5.016.04) 7.5.0I CXX: g++ (Ubuntu 7.5.0-3ubuntu1
cc -I. -O3 -std=c11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -pthread -march=native -mtune=native -DGGML_USE_K_QUANTS -c -o k_quants.o k_quants.c
k_quants.c: In function ‘ggml_vec_dot_q2_K_q8_K’:
k_quants.c:1121:36: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’? [-Wimplicit-function-declaration]
const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
^~~~~~~~~~~~~~~~
_mm256_set_epi8
k_quants.c:1121:35: warning: missing braces around initializer [-Wmissing-braces]
const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
^
{ }
k_quants.c: In function ‘ggml_vec_dot_q3_K_q8_K’:
k_quants.c:1361:35: warning: missing braces around initializer [-Wmissing-braces]
const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
^
{ }
k_quants.c: In function ‘ggml_vec_dot_q4_K_q8_K’:
k_quants.c:1635:32: error: incompatible types when initializing type ‘__m256i {aka const __vector(4) long long int}’ using type ‘int’
const __m256i scales = _mm256_set_m128i(sc128, sc128);
^~~~~~~~~~~~~~~~
k_quants.c: In function ‘ggml_vec_dot_q5_K_q8_K’:
k_quants.c:1865:32: error: incompatible types when initializing type ‘__m256i {aka const __vector(4) long long int}’ using type ‘int’
const __m256i scales = _mm256_set_m128i(sc128, sc128);
^~~~~~~~~~~~~~~~
: recipe for target 'k_quants.o' failed
make: *** [k_quants.o] Error 1
The text was updated successfully, but these errors were encountered: