From: shalinib-ibm Date: Wed, 22 Jul 2026 09:26:40 +0000 (+0530) Subject: ggml: enable PowerPC backend variants on AIX (#25983) X-Git-Tag: upstream/0.0.10438~346 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=3ce7da2c852c538c4c5f9806da27029cf8c9cc4a;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml: enable PowerPC backend variants on AIX (#25983) * ggml: enable PowerPC backend variants on AIX Allow the PowerPC CPU backend variants to be built on AIX by extending the platform check in the CMake configuration. This reuses the existing PowerPC backend implementations without changing their behavior. Also fix a missing semicolon in the PowerPC Q0 matmul implementation. * Fix missing semicolon in sgemm.cpp --- diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index 11583474a..82e9480c2 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -430,7 +430,7 @@ if (GGML_CPU_ALL_VARIANTS) message(FATAL_ERROR "Unsupported ARM target OS: ${CMAKE_SYSTEM_NAME}") endif() elseif (GGML_SYSTEM_ARCH STREQUAL "PowerPC") - if (CMAKE_SYSTEM_NAME MATCHES "Linux") + if (CMAKE_SYSTEM_NAME MATCHES "Linux|AIX") ggml_add_cpu_backend_variant(power0) ggml_add_cpu_backend_variant(power7_1 POWER7) ggml_add_cpu_backend_variant(power7_2 POWER7 VSX) diff --git a/ggml/src/ggml-cpu/llamafile/sgemm.cpp b/ggml/src/ggml-cpu/llamafile/sgemm.cpp index 5efaaa5b2..23bcd54c1 100644 --- a/ggml/src/ggml-cpu/llamafile/sgemm.cpp +++ b/ggml/src/ggml-cpu/llamafile/sgemm.cpp @@ -2329,7 +2329,7 @@ class tinyBLAS_Q0_PPC { mc = 32; nc = 32; kc = 32; - n_chunk = 32 + n_chunk = 32; #endif int64_t n_aligned = 0; if (n % n_chunk == 0) {