From 8ccb4f856c4bfa55b4741eeedc51c5ed13081166 Mon Sep 17 00:00:00 2001 From: Adam Caldwell <2320451+accaldwell@users.noreply.github.com> Date: Wed, 18 Mar 2026 01:18:02 -0700 Subject: [PATCH] Enable AVX-VNNI 256-bit path for Q8_1 R8 dot product (#1455) Ungate the VNNI path in mul_mat_q8_1_r8_q8_2 by changing the guard from HAVE_FANCY_SIMD to HAVE_VNNI256. This block only uses 256-bit intrinsics so it is safe for AVX-VNNI (non-512) CPUs. Co-authored-by: Adam Caldwell --- ggml/src/iqk/iqk_gemm_legacy_quants.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/iqk/iqk_gemm_legacy_quants.cpp b/ggml/src/iqk/iqk_gemm_legacy_quants.cpp index ca90f748..9c8ce65e 100644 --- a/ggml/src/iqk/iqk_gemm_legacy_quants.cpp +++ b/ggml/src/iqk/iqk_gemm_legacy_quants.cpp @@ -1751,7 +1751,7 @@ static void mul_mat_q8_1_r8_q8_2(int n, const void * vx, size_t bx, const DataIn auto dot = [&qx] (const int8_t * qy) { auto y128 = _mm_loadu_si128((const __m128i*)qy); auto y = MM256_SET_M128I(y128, y128); -#ifdef HAVE_FANCY_SIMD +#ifdef HAVE_VNNI256 auto sumi = _mm256_setzero_si256(); sumi = _mm256_dpbusd_epi32(sumi, qx[0], _mm256_shuffle_epi32(y, 0x00)); sumi = _mm256_dpbusd_epi32(sumi, qx[1], _mm256_shuffle_epi32(y, 0x55));