Skip to content

Commit cdf5e72

Browse files
committed
ci : disable fast-math for Metal GHA CI (llama/14478)
* ci : disable fast-math for Metal GHA CI ggml-ci * cont : remove -g flag ggml-ci
1 parent 32d7c10 commit cdf5e72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ggml/src/ggml-metal/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ else()
7171
# note: adding -fno-inline fixes the tests when using MTL_SHADER_VALIDATION=1
7272
# note: unfortunately, we have to call it default.metallib instead of ggml.metallib
7373
# ref: https://github.com/ggerganov/whisper.cpp/issues/1720
74-
set(XC_FLAGS -fno-fast-math -fno-inline -g)
74+
# note: adding -g causes segmentation fault during compile
75+
#set(XC_FLAGS -fno-fast-math -fno-inline -g)
76+
set(XC_FLAGS -fno-fast-math -fno-inline)
7577
else()
7678
set(XC_FLAGS -O3)
7779
endif()
@@ -90,7 +92,7 @@ else()
9092
add_custom_command(
9193
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
9294
COMMAND xcrun -sdk macosx metal ${XC_FLAGS} -c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal -o - |
93-
xcrun -sdk macosx metallib - -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
95+
xcrun -sdk macosx metallib - -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
9496
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-common.h
9597
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal
9698
DEPENDS ggml-metal.metal ${METALLIB_COMMON}

0 commit comments

Comments
 (0)