Skip to content

Commit 44cd8d9

Browse files
authored
feat(ggml-cpu): enable z17 compile (#13182)
z17 compilation requires GCC 15.1.0 and onwards Signed-off-by: Aaron Teo <[email protected]>
1 parent 5933e6f commit 44cd8d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ggml/src/ggml-cpu/CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,14 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
352352
# TODO: Separation to determine activation of VX/VXE/VXE2
353353
if (${S390X_M} MATCHES "8561|8562")
354354
message(STATUS "z15 target")
355-
list(APPEND ARCH_FLAGS -march=z15 -mtune=z15)
355+
list(APPEND ARCH_FLAGS -march=z15)
356356
elseif (${S390X_M} MATCHES "3931")
357357
message(STATUS "z16 target")
358-
list(APPEND ARCH_FLAGS -march=z16 -mtune=z16)
358+
list(APPEND ARCH_FLAGS -march=z16)
359+
elseif (${S390X_M} MATCHES "9175|9176")
360+
# NOTE: Only available from GCC 15.1.0 onwards. Any z17 machine with compile issues must first verify their GCC version.
361+
message(STATUS "z17 target")
362+
list(APPEND ARCH_FLAGS -march=z17)
359363
else()
360364
message(STATUS "Unknown target")
361365
message(WARNING "Unknown target. If you are compiling for z14 and earlier, you might have to add -DGGML_VXE=OFF.")

0 commit comments

Comments
 (0)