Skip to content

Commit 3a42a05

Browse files
committed
ggml: cmake remove fork when determining s390x machine type
thank you @ericcurtin Signed-off-by: Aaron Teo <[email protected]>
1 parent 751528d commit 3a42a05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/ggml-cpu/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
312312
endif()
313313
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")
314314
message(STATUS "s390x detected")
315-
execute_process(COMMAND bash -c "grep -Pom 1 'machine = \\K([0-9]+)' /proc/cpuinfo" OUTPUT_VARIABLE S390X_M)
315+
file(READ "/proc/cpuinfo" CPUINFO_CONTENTS)
316+
string(REGEX REPLACE "machine[ \t\r\n]*=[ \t\r\n]*([0-9]+)" "\\1" S390X_M ${CPUINFO_CONTENTS})
316317

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

0 commit comments

Comments
 (0)