Description
We wanted to build binaries for ARMv6,7 on Linux but we're getting the following two types of errors:
[09:00:29] /workspace/srcdir/llama.cpp/ggml-quants.c: In function ‘ggml_vec_dot_iq2_s_q8_K’:
[09:00:29] /workspace/srcdir/llama.cpp/ggml-quants.c:9645:32: error: implicit declaration of function ‘vld1q_u8_x2’; did you mean ‘vld1q_u32’? [-Werror=implicit-function-declaration]
[09:00:29] 9645 | const uint8x16x2_t mask1 = vld1q_u8_x2(k_mask1);
Similar:
/workspace/srcdir/llama.cpp/ggml-quants.c:9678:34: error: implicit declaration of function ‘vqtbl1q_u8’; did you mean ‘vtbl1_u8’? [-Werror=implicit-function-declaration]
[09:09:12] 9678 | vs.val[1] = vandq_u8(vqtbl1q_u8(vs.val[0], mask1.val[1]), mask2);
[09:09:12] | ^~~~~~~~~~
[09:09:12] | vtbl1_u8
[09:09:12] /workspace/srcdir/llama.cpp/ggml-quants.c:9678:34: error: incompatible type for argument 1 of ‘vandq_u8’
And also incompatible type error:
[16:13:22] /workspace/srcdir/llama.cpp/ggml-quants.c:9517:34: error: incompatible type for argument 1 of ‘vandq_u8’
| [16:13:22] 9517 | vs.val[0] = vandq_u8(ggml_vqtbl1q_u8(vs.val[0], mask1.val[0]), mask2);
| [16:13:22] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| [16:13:22] | |
| [16:13:22] | int8x16_t
| [16:13:22] In file included from /workspace/srcdir/llama.cpp/ggml-impl.h:54,
| [16:13:22] from /workspace/srcdir/llama.cpp/ggml-quants.h:3,
| [16:13:22] from /workspace/srcdir/llama.cpp/ggml-quants.c:1:
| [16:13:22] /opt/arm-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/10.2.0/include/arm_neon.h:13824:22: note: expected ‘uint8x16_t’ but argument is of type ‘int8x16_t’
This is a similar problem to what you've fixed previously in this PR.
Where the following compats have been added:
ggml_int8x16x4_t q2u; ggml_int8x16x4_t q2s; ggml_int8x16x4_t q8b;
Would it be possible to apply the same fix here?
Steps to reproduce:
cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBUILD_SHARED_LIBS=ON \
-DLLAMA_BUILD_TESTS=OFF \
-DLLAMA_BUILD_EXAMPLES=ON \
-DLLAMA_NATIVE=OFF \
-DLLAMA_ACCELERATE=ON \
-DLLAMA_AVX=ON \
-DLLAMA_AVX2=ON \
-DLLAMA_F16C=ON \
-DLLAMA_FMA=ON \
-DLLAMA_BLAS=OFF \
-DLLAMA_CUBLAS=OFF \
-DLLAMA_CLBLAST=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-lrt"
Version: Latest master (b2277)
System: build system for armv7l-linux-gnueabihf-cxx11 (C compiler 10.2.0)
Build log: https://buildkite.com/julialang/yggdrasil/builds/8666#018de62d-6d77-4615-ab15-8357fb2d8c09
(The build log points to v2272, but I have verified locally that the error is identical on b2277)
Thank you for your help :)