Skip to content

ggml-cpu : fix PQ2_0 x86 vec_dot build on non-AVX2 CPU variants - #263

Merged
khosravipasha merged 1 commit into
prismfrom
fix/pq2-x86-nonavx-variants
Sep 24, 2026
Merged

khosravipasha merged 1 commit into
prismfrom
fix/pq2-x86-nonavx-variants

Conversation

@khosravipasha

Copy link
Copy Markdown
Collaborator

The Release (Prism) run 35961414463 fails in ubuntu-cpu x64, which builds with GGML_CPU_ALL_VARIANTS=ON and LLAMA_FATAL_WARNINGS=ON. In the variants without AVX2 (x64, sse42, sandybridge), arch/x86/quants.c from #206 hits two errors:

  • pq2k_dpbusd_acc returns __m256i at file scope, outside any AVX2 guard: -Werror=psabi.
  • ggml_vec_dot_pq2_0_q8_K declares x, y, nb before the #if defined(__AVX2__), and the generic fallback never uses them: -Werror=unused-variable.

Fix: guard the helper with #if defined(__AVX2__) and mark the three variables UNUSED in the fallback, the same way the neighbouring vec_dot functions do. No change to the AVX2 code path.

PR CI does not build all CPU variants with fatal warnings, which is why #206 passed its checks.

Tested: the release job's configuration (GCC 11, all CPU variants, fatal warnings, same cmake flags) builds cleanly, all 14 CPU variant libraries produced.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant