Spaces:
Running
Running
ci : disable fast-math for Metal GHA CI (llama/14478)
Browse files* ci : disable fast-math for Metal GHA CI
ggml-ci
* cont : remove -g flag
ggml-ci
ggml/src/ggml-metal/CMakeLists.txt
CHANGED
|
@@ -71,7 +71,9 @@ else()
|
|
| 71 |
# note: adding -fno-inline fixes the tests when using MTL_SHADER_VALIDATION=1
|
| 72 |
# note: unfortunately, we have to call it default.metallib instead of ggml.metallib
|
| 73 |
# ref: https://github.com/ggerganov/whisper.cpp/issues/1720
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
else()
|
| 76 |
set(XC_FLAGS -O3)
|
| 77 |
endif()
|
|
@@ -90,7 +92,7 @@ else()
|
|
| 90 |
add_custom_command(
|
| 91 |
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
|
| 92 |
COMMAND xcrun -sdk macosx metal ${XC_FLAGS} -c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal -o - |
|
| 93 |
-
|
| 94 |
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-common.h
|
| 95 |
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal
|
| 96 |
DEPENDS ggml-metal.metal ${METALLIB_COMMON}
|
|
|
|
| 71 |
# note: adding -fno-inline fixes the tests when using MTL_SHADER_VALIDATION=1
|
| 72 |
# note: unfortunately, we have to call it default.metallib instead of ggml.metallib
|
| 73 |
# ref: https://github.com/ggerganov/whisper.cpp/issues/1720
|
| 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)
|
| 77 |
else()
|
| 78 |
set(XC_FLAGS -O3)
|
| 79 |
endif()
|
|
|
|
| 92 |
add_custom_command(
|
| 93 |
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
|
| 94 |
COMMAND xcrun -sdk macosx metal ${XC_FLAGS} -c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal -o - |
|
| 95 |
+
xcrun -sdk macosx metallib - -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
|
| 96 |
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-common.h
|
| 97 |
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal
|
| 98 |
DEPENDS ggml-metal.metal ${METALLIB_COMMON}
|