Skip to content

Commit b4159ea

Browse files
committed
disable int8_matmul optimisations for non Q4_0 models
1 parent d4f4bfc commit b4159ea

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ggml/src/ggml-backend-reg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ void ggml_backend_reg_layla(bool useVulkan, bool useOpenCL, bool useHexagon) {
319319
laylaUseHexagon = useHexagon;
320320
}
321321

322-
// static declaration must be outside of the function to support some older CPUs
323-
static ggml_backend_registry reg;
324322
static ggml_backend_registry & get_reg() {
323+
static ggml_backend_registry reg;
324+
325325
return reg;
326326
}
327327

ggml/src/ggml-cpu/ggml-cpu-quants.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8519,11 +8519,11 @@ void ggml_vec_dot_q5_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
85198519

85208520
void ggml_vec_dot_q6_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) {
85218521
assert(n % QK_K == 0);
8522-
#ifdef __ARM_FEATURE_MATMUL_INT8
8522+
/*#ifdef __ARM_FEATURE_MATMUL_INT8
85238523
assert((nrc == 2) || (nrc == 1));
85248524
#else
85258525
assert(nrc == 1);
8526-
#endif
8526+
#endif*/
85278527
UNUSED(nrc);
85288528
UNUSED(bx);
85298529
UNUSED(by);
@@ -8534,7 +8534,7 @@ void ggml_vec_dot_q6_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
85348534

85358535
const int nb = n / QK_K;
85368536

8537-
#if defined(__ARM_FEATURE_MATMUL_INT8)
8537+
/*#if defined(__ARM_FEATURE_MATMUL_INT8)
85388538
if (nrc == 2) {
85398539
const block_q6_K * GGML_RESTRICT x0 = x;
85408540
const block_q6_K * GGML_RESTRICT x1 = (const block_q6_K *) ((const uint8_t *)vx + bx);
@@ -8723,7 +8723,7 @@ void ggml_vec_dot_q6_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
87238723

87248724
return;
87258725
}
8726-
#endif
8726+
#endif*/
87278727

87288728
#ifdef __ARM_FEATURE_SVE
87298729
const int vector_length = ggml_cpu_get_sve_cnt()*8;

0 commit comments

Comments
 (0)