Skip to content

Commit

Permalink
ggml: cmake remove fork when determining s390x machine type
Browse files Browse the repository at this point in the history
thank you @ericcurtin

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
  • Loading branch information
taronaeo committed Feb 22, 2025
1 parent 751528d commit 3a42a05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ggml/src/ggml-cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
endif()
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")
message(STATUS "s390x detected")
execute_process(COMMAND bash -c "grep -Pom 1 'machine = \\K([0-9]+)' /proc/cpuinfo" OUTPUT_VARIABLE S390X_M)
file(READ "/proc/cpuinfo" CPUINFO_CONTENTS)
string(REGEX REPLACE "machine[ \t\r\n]*=[ \t\r\n]*([0-9]+)" "\\1" S390X_M ${CPUINFO_CONTENTS})

# TODO: Separation to determine activation of VX/VXE/VXE2
if (${S390X_M} MATCHES "8561|8562")
Expand Down

0 comments on commit 3a42a05

Please sign in to comment.