Skip to content

Commit 0f655f2

Browse files
authored
ci: build portable llama.cpp release binaries (#3037)
Disable native ggml CPU tuning and high ISA flags for generic llama.cpp release assets so prebuilt binaries do not depend on the CI runner CPU instruction set.
1 parent 8f8ce5f commit 0f655f2

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/build-llamacpp-binaries.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,23 @@ jobs:
3333
- uses: actions/checkout@v4
3434
- name: Configure and build
3535
run: |
36-
cmake -B build -DCMAKE_BUILD_TYPE=Release
36+
# Release binaries must be portable across user machines, not tuned to
37+
# the ephemeral CI runner CPU. A native ggml build may emit AVX512 or
38+
# AVX-VNNI instructions and then crash with SIGILL on ordinary CPUs.
39+
# Keep the prebuilt x64 package conservative; optimized AVX2/AVX512
40+
# builds can be published as separate assets later.
41+
cmake -B build -DCMAKE_BUILD_TYPE=Release \
42+
-DGGML_NATIVE=OFF \
43+
-DGGML_AVX=OFF \
44+
-DGGML_AVX2=OFF \
45+
-DGGML_AVX_VNNI=OFF \
46+
-DGGML_AVX512=OFF \
47+
-DGGML_AVX512_VBMI=OFF \
48+
-DGGML_AVX512_VNNI=OFF \
49+
-DGGML_AVX512_BF16=OFF \
50+
-DGGML_FMA=OFF \
51+
-DGGML_F16C=OFF \
52+
-DGGML_BMI2=OFF
3753
cmake --build build --config Release -j 2
3854
- name: Package
3955
run: |

0 commit comments

Comments
 (0)