From c4934bc4cf14f08f78beb0d45da14967d5cc3b04 Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Mon, 26 Aug 2024 14:15:27 +0900 Subject: [PATCH] manually undefine i8mm support for normal gguf --- ggml/src/ggml-quants.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ggml/src/ggml-quants.c b/ggml/src/ggml-quants.c index d5b91c2dbc0c1..1158444191dd5 100644 --- a/ggml/src/ggml-quants.c +++ b/ggml/src/ggml-quants.c @@ -26,6 +26,13 @@ #define UNUSED GGML_UNUSED +// we force undef the i8mm feature here +// this is because we want to compile our app WITH the i8mm feature to support faster calculations for devices that support it +// those devices will use the special Q4_048 quants, whose code is in the ggml-arrch64.c file +// this file contains code for "normal" quants, so we disable the i8mm feature explicitly +// this makes running normal quants slightly slower for devices that support i8mm, but it's a small price to pay to support a wider range of deices +#undef __ARM_FEATURE_MATMUL_INT8 + // some compilers don't provide _mm256_set_m128i, e.g. gcc 7 #define MM256_SET_M128I(a, b) _mm256_insertf128_si256(_mm256_castsi128_si256(b), (a), 1)