Skip to content

Commit de56944

Browse files
authored
ci : disable fast-math for Metal GHA CI (#14478)
* ci : disable fast-math for Metal GHA CI ggml-ci * cont : remove -g flag ggml-ci
1 parent 1b2aaf2 commit de56944

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ jobs:
8484
-DCMAKE_BUILD_RPATH="@loader_path" \
8585
-DLLAMA_FATAL_WARNINGS=ON \
8686
-DGGML_METAL_USE_BF16=ON \
87-
-DGGML_METAL_EMBED_LIBRARY=ON \
87+
-DGGML_METAL_EMBED_LIBRARY=OFF \
88+
-DGGML_METAL_SHADER_DEBUG=ON \
8889
-DGGML_RPC=ON
8990
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
9091

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)