Aaron Teo commited on
Commit
10f7d18
·
1 Parent(s): d13b876

feat(ggml-cpu): enable z17 compile (llama/13182)

Browse files

z17 compilation requires GCC 15.1.0 and onwards

Signed-off-by: Aaron Teo <[email protected]>

Files changed (1) hide show
  1. ggml/src/ggml-cpu/CMakeLists.txt +6 -2
ggml/src/ggml-cpu/CMakeLists.txt CHANGED
@@ -352,10 +352,14 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
352
  # TODO: Separation to determine activation of VX/VXE/VXE2
353
  if (${S390X_M} MATCHES "8561|8562")
354
  message(STATUS "z15 target")
355
- list(APPEND ARCH_FLAGS -march=z15 -mtune=z15)
356
  elseif (${S390X_M} MATCHES "3931")
357
  message(STATUS "z16 target")
358
- list(APPEND ARCH_FLAGS -march=z16 -mtune=z16)
 
 
 
 
359
  else()
360
  message(STATUS "Unknown target")
361
  message(WARNING "Unknown target. If you are compiling for z14 and earlier, you might have to add -DGGML_VXE=OFF.")
 
352
  # TODO: Separation to determine activation of VX/VXE/VXE2
353
  if (${S390X_M} MATCHES "8561|8562")
354
  message(STATUS "z15 target")
355
+ list(APPEND ARCH_FLAGS -march=z15)
356
  elseif (${S390X_M} MATCHES "3931")
357
  message(STATUS "z16 target")
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)
363
  else()
364
  message(STATUS "Unknown target")
365
  message(WARNING "Unknown target. If you are compiling for z14 and earlier, you might have to add -DGGML_VXE=OFF.")