File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 84
84
-DCMAKE_BUILD_RPATH="@loader_path" \
85
85
-DLLAMA_FATAL_WARNINGS=ON \
86
86
-DGGML_METAL_USE_BF16=ON \
87
- -DGGML_METAL_EMBED_LIBRARY=ON \
87
+ -DGGML_METAL_EMBED_LIBRARY=OFF \
88
+ -DGGML_METAL_SHADER_DEBUG=ON \
88
89
-DGGML_RPC=ON
89
90
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
90
91
Original file line number Diff line number Diff line change 71
71
# note: adding -fno-inline fixes the tests when using MTL_SHADER_VALIDATION=1
72
72
# note: unfortunately, we have to call it default.metallib instead of ggml.metallib
73
73
# 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 )
75
77
else ()
76
78
set (XC_FLAGS -O3 )
77
79
endif ()
90
92
add_custom_command (
91
93
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /default.metallib
92
94
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
94
96
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /ggml-common.h
95
97
COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /ggml-metal.metal
96
98
DEPENDS ggml-metal.metal ${METALLIB_COMMON}
You can’t perform that action at this time.
0 commit comments