]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
feat(ggml-cpu): enable z17 compile (#13182)
authorAaron Teo <redacted>
Wed, 30 Apr 2025 09:47:35 +0000 (17:47 +0800)
committerGitHub <redacted>
Wed, 30 Apr 2025 09:47:35 +0000 (10:47 +0100)
z17 compilation requires GCC 15.1.0 and onwards

Signed-off-by: Aaron Teo <redacted>
ggml/src/ggml-cpu/CMakeLists.txt

index 6a652738c10a9fd5e9682c25d8aa5551e65f3382..9a3085befc47645b1d95ec9be3cd01fc90a2800c 100644 (file)
@@ -352,10 +352,14 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
         # TODO: Separation to determine activation of VX/VXE/VXE2
         if (${S390X_M} MATCHES "8561|8562")
             message(STATUS "z15 target")
-            list(APPEND ARCH_FLAGS -march=z15 -mtune=z15)
+            list(APPEND ARCH_FLAGS -march=z15)
         elseif (${S390X_M} MATCHES "3931")
             message(STATUS "z16 target")
-            list(APPEND ARCH_FLAGS -march=z16 -mtune=z16)
+            list(APPEND ARCH_FLAGS -march=z16)
+        elseif (${S390X_M} MATCHES "9175|9176")
+            # NOTE: Only available from GCC 15.1.0 onwards. Any z17 machine with compile issues must first verify their GCC version.
+            message(STATUS "z17 target")
+            list(APPEND ARCH_FLAGS -march=z17)
         else()
             message(STATUS "Unknown target")
             message(WARNING "Unknown target. If you are compiling for z14 and earlier, you might have to add -DGGML_VXE=OFF.")