From aee5e863ad1ad4c283f7f74d3da8e910c85c1250 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Thu, 19 Mar 2026 11:21:10 +0900 Subject: [PATCH 01/15] Remove make dependency --- ci/run.sh | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index eaf6358c0d..5da6bfb8b8 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -242,13 +242,13 @@ function gg_run_ctest_debug { set -e - # Check cmake, make and ctest are installed + # Check cmake and ctest are installed gg_check_build_requirements (time cmake -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake --build . --config Debug -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log - (time ctest --output-on-failure -L main -E "test-opt|test-backend-ops" ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log + (time ctest -C Debug --output-on-failure -L main -E "test-opt|test-backend-ops" ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log set +e } @@ -273,16 +273,16 @@ function gg_run_ctest_release { set -e - # Check cmake, make and ctest are installed + # Check cmake and ctest are installed gg_check_build_requirements (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log if [ -z ${GG_BUILD_LOW_PERF} ]; then - (time ctest --output-on-failure -L 'main|python' ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log + (time ctest -C Release --output-on-failure -L 'main|python' ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log else - (time ctest --output-on-failure -L main -E test-opt ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log + (time ctest -C Release --output-on-failure -L main -E test-opt ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log fi set +e @@ -340,7 +340,7 @@ function gg_run_ctest_with_model_debug { cd build-ci-debug set -e - (LLAMACPP_TEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log + (LLAMACPP_TEST_MODELFILE="$model" time ctest -C Debug --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log set +e cd .. @@ -353,7 +353,7 @@ function gg_run_ctest_with_model_release { cd build-ci-release set -e - (LLAMACPP_TEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log + (LLAMACPP_TEST_MODELFILE="$model" time ctest -C Release --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log # test memory leaks #if [[ ! -z ${GG_BUILD_METAL} ]]; then @@ -408,7 +408,7 @@ function gg_run_qwen3_0_6b { set -e (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf --outtype f16 python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-bf16.gguf --outtype bf16 @@ -557,7 +557,7 @@ function gg_run_embd_bge_small { set -e (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf @@ -602,7 +602,7 @@ function gg_run_rerank_tiny { set -e (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time make -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf @@ -652,10 +652,6 @@ function gg_check_build_requirements { gg_printf 'cmake not found, please install' fi - if ! command -v make &> /dev/null; then - gg_printf 'make not found, please install' - fi - if ! command -v ctest &> /dev/null; then gg_printf 'ctest not found, please install' fi From 80a998594398ab13061d825c99358b922dca6228 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Mon, 23 Mar 2026 11:42:49 +0900 Subject: [PATCH 02/15] Added option to specify Ninja generator --- ci/run.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index 5da6bfb8b8..2a98b941b6 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -57,6 +57,13 @@ SRC=`pwd` CMAKE_EXTRA="-DLLAMA_FATAL_WARNINGS=${LLAMA_FATAL_WARNINGS:-ON} -DLLAMA_OPENSSL=OFF -DGGML_SCHED_NO_REALLOC=ON" CTEST_EXTRA="" +# Default to use make unless specified for compatibility +CMAKE_GENERATOR=(-G "Unix Makefiles") + +if [ -n "${GG_BUILD_NINJA}" ]; then + CMAKE_GENERATOR=(-G Ninja) +fi + if [ ! -z ${GG_BUILD_METAL} ]; then CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON" fi @@ -245,8 +252,8 @@ function gg_run_ctest_debug { # Check cmake and ctest are installed gg_check_build_requirements - (time cmake -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time cmake --build . --config Debug -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake --build . --config Debug -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log (time ctest -C Debug --output-on-failure -L main -E "test-opt|test-backend-ops" ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log @@ -276,8 +283,8 @@ function gg_run_ctest_release { # Check cmake and ctest are installed gg_check_build_requirements - (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log if [ -z ${GG_BUILD_LOW_PERF} ]; then (time ctest -C Release --output-on-failure -L 'main|python' ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log @@ -407,8 +414,8 @@ function gg_run_qwen3_0_6b { set -e - (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf --outtype f16 python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-bf16.gguf --outtype bf16 @@ -556,8 +563,8 @@ function gg_run_embd_bge_small { set -e - (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf @@ -601,8 +608,8 @@ function gg_run_rerank_tiny { set -e - (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log - (time cmake --build . --config Release -j$(nproc) ) 2>&1 | tee -a $OUT/${ci}-make.log + (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf From f552c4559b85e222aab37f654da764af4283fee7 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Mon, 23 Mar 2026 12:15:45 +0900 Subject: [PATCH 03/15] use ninja-build as default for several CI --- .github/workflows/build.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d500d3098..847afcf47e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1079,12 +1079,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-low-perf: runs-on: ubuntu-22.04-arm @@ -1105,12 +1105,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-x64-cpu-high-perf: runs-on: ubuntu-22.04 @@ -1131,12 +1131,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf: runs-on: ubuntu-22.04-arm @@ -1157,12 +1157,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf-sve: runs-on: ubuntu-22.04-arm @@ -1183,12 +1183,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai: runs-on: ubuntu-22.04-arm @@ -1209,12 +1209,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install -y build-essential + sudo apt-get install -y build-essential ninja-build - name: Test id: ggml-ci run: | - GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai-graviton4: runs-on: ah-ubuntu_22_04-c8g_8x @@ -1232,6 +1232,7 @@ jobs: sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \ apt-get install -y \ build-essential \ + ninja-build \ python3-venv \ gpg \ wget \ @@ -1262,4 +1263,5 @@ jobs: run: | GG_BUILD_KLEIDIAI=1 \ GG_BUILD_EXTRA_TESTS_0=1 \ + GG_BUILD_NINJA=1 \ bash ./ci/run.sh ./tmp/results ./tmp/mnt From 60b8cb0a2f3dd10ce9fddd6b96cdd4c429e8118f Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Tue, 24 Mar 2026 12:39:26 +0900 Subject: [PATCH 04/15] Revert "use ninja-build as default for several CI" This reverts commit f552c4559b85e222aab37f654da764af4283fee7. --- .github/workflows/build.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 847afcf47e..6d500d3098 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1079,12 +1079,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential ninja-build + sudo apt-get install build-essential - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-low-perf: runs-on: ubuntu-22.04-arm @@ -1105,12 +1105,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential ninja-build + sudo apt-get install build-essential - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-x64-cpu-high-perf: runs-on: ubuntu-22.04 @@ -1131,12 +1131,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential ninja-build + sudo apt-get install build-essential - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf: runs-on: ubuntu-22.04-arm @@ -1157,12 +1157,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential ninja-build + sudo apt-get install build-essential - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf-sve: runs-on: ubuntu-22.04-arm @@ -1183,12 +1183,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential ninja-build + sudo apt-get install build-essential - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai: runs-on: ubuntu-22.04-arm @@ -1209,12 +1209,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install -y build-essential ninja-build + sudo apt-get install -y build-essential - name: Test id: ggml-ci run: | - GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai-graviton4: runs-on: ah-ubuntu_22_04-c8g_8x @@ -1232,7 +1232,6 @@ jobs: sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \ apt-get install -y \ build-essential \ - ninja-build \ python3-venv \ gpg \ wget \ @@ -1263,5 +1262,4 @@ jobs: run: | GG_BUILD_KLEIDIAI=1 \ GG_BUILD_EXTRA_TESTS_0=1 \ - GG_BUILD_NINJA=1 \ bash ./ci/run.sh ./tmp/results ./tmp/mnt From 29487c45f0c7454aa140ee22bf4f311f2b9172e4 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Tue, 24 Mar 2026 12:49:35 +0900 Subject: [PATCH 05/15] changed use plain string rather than arrays --- ci/run.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index 2a98b941b6..a17d01e0c0 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -58,10 +58,10 @@ CMAKE_EXTRA="-DLLAMA_FATAL_WARNINGS=${LLAMA_FATAL_WARNINGS:-ON} -DLLAMA_OPENSSL= CTEST_EXTRA="" # Default to use make unless specified for compatibility -CMAKE_GENERATOR=(-G "Unix Makefiles") +CMAKE_GENERATOR="Unix Makefiles" if [ -n "${GG_BUILD_NINJA}" ]; then - CMAKE_GENERATOR=(-G Ninja) + CMAKE_GENERATOR="Ninja" fi if [ ! -z ${GG_BUILD_METAL} ]; then @@ -252,7 +252,7 @@ function gg_run_ctest_debug { # Check cmake and ctest are installed gg_check_build_requirements - (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log (time cmake --build . --config Debug -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log (time ctest -C Debug --output-on-failure -L main -E "test-opt|test-backend-ops" ${CTEST_EXTRA}) 2>&1 | tee -a $OUT/${ci}-ctest.log @@ -283,7 +283,7 @@ function gg_run_ctest_release { # Check cmake and ctest are installed gg_check_build_requirements - (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log if [ -z ${GG_BUILD_LOW_PERF} ]; then @@ -414,7 +414,7 @@ function gg_run_qwen3_0_6b { set -e - (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf --outtype f16 @@ -563,7 +563,7 @@ function gg_run_embd_bge_small { set -e - (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf @@ -608,7 +608,7 @@ function gg_run_rerank_tiny { set -e - (time cmake "${CMAKE_GENERATOR[@]}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log + (time cmake -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log (time cmake --build . --config Release -j$(nproc)) 2>&1 | tee -a $OUT/${ci}-make.log python3 ../convert_hf_to_gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf From e7304e2f0e59a3db902fa1b93d922cdfc7511838 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Tue, 24 Mar 2026 14:44:59 +0900 Subject: [PATCH 06/15] Enabled ninja build by default for experimentation --- .github/workflows/build.yml | 63 +++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d500d3098..8fe42dbed0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,7 @@ jobs: run: | sysctl -a cmake -B build \ + -G "Ninja Multi-Config" \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -118,6 +119,7 @@ jobs: # Metal is disabled due to intermittent failures with Github runners not having a GPU: # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313 cmake -B build \ + -G "Ninja Multi-Config" \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -165,7 +167,7 @@ jobs: id: cmake_build run: | export CMAKE_PREFIX_PATH=dawn - cmake -B build -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF + cmake -B build -G "Ninja Multi-Config" -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) - name: Test @@ -209,7 +211,7 @@ jobs: sudo apt-get install -y --no-install-recommends \ python3 python3-pip python3-dev \ libjpeg-dev build-essential libssl-dev \ - git-lfs + git-lfs ninja-build - name: Python Dependencies id: python_depends @@ -229,6 +231,7 @@ jobs: id: cmake_build run: | cmake -B build \ + -G "Ninja Multi-Config" \ -DLLAMA_FATAL_WARNINGS=ON \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -274,12 +277,13 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential libssl-dev + sudo apt-get install build-essential libssl-dev ninja-build - name: Build id: cmake_build run: | cmake -B build \ + -G "Ninja Multi-Config" \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -300,12 +304,13 @@ jobs: - name: Dependencies id: depends run: | - sudo apt-get install -y glslc libvulkan-dev libssl-dev + sudo apt-get install -y glslc libvulkan-dev libssl-dev ninja-build - name: Configure id: cmake_configure run: | cmake -B build \ + -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGGML_BACKEND_DL=ON \ -DGGML_CPU_ALL_VARIANTS=ON \ @@ -336,7 +341,8 @@ jobs: run: | sudo add-apt-repository -y ppa:kisak/kisak-mesa sudo apt-get update -y - sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libssl-dev + sudo apt-get install -y build-essential mesa-vulkan-drivers \ + libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libssl-dev ninja-build - name: Get latest Vulkan SDK version id: vulkan_sdk_version @@ -377,6 +383,7 @@ jobs: run: | export Dawn_DIR=dawn/lib64/cmake/Dawn cmake -B build \ + -G "Ninja Multi-Config" \ -DGGML_WEBGPU=ON cmake --build build --config Release -j $(nproc) @@ -415,11 +422,12 @@ jobs: run: | source emsdk/emsdk_env.sh emcmake cmake -B build-wasm \ + -G "Ninja Multi-Config" \ -DGGML_WEBGPU=ON \ -DLLAMA_OPENSSL=OFF \ -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg - cmake --build build-wasm --target test-backend-ops -j $(nproc) + cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc) ubuntu-22-hip: runs-on: ubuntu-22.04 @@ -434,7 +442,7 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev rocwmma-dev + sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev rocwmma-dev ninja-build - name: ccache uses: ggml-org/ccache-action@v1.2.21 @@ -447,6 +455,7 @@ jobs: id: cmake_build run: | cmake -B build -S . \ + -G "Ninja Multi-Config" \ -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \ -DGGML_HIP_ROCWMMA_FATTN=ON \ -DGGML_HIP=ON @@ -465,7 +474,7 @@ jobs: id: depends run: | apt-get update - apt-get install -y build-essential git cmake libssl-dev + apt-get install -y build-essential git cmake libssl-dev ninja-build - name: ccache uses: ggml-org/ccache-action@v1.2.21 @@ -478,6 +487,7 @@ jobs: id: cmake_build run: | cmake -B build -S . \ + -G "Ninja Multi-Config" \ -DGGML_MUSA=ON cmake --build build --config Release -j $(nproc) @@ -502,7 +512,7 @@ jobs: shell: bash run: | sudo apt update - sudo apt install intel-oneapi-compiler-dpcpp-cpp libssl-dev + sudo apt install intel-oneapi-compiler-dpcpp-cpp libssl-dev ninja-build - name: install oneAPI MKL library shell: bash @@ -525,6 +535,7 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cmake -B build \ + -G "Ninja Multi-Config" \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx @@ -551,7 +562,7 @@ jobs: shell: bash run: | sudo apt update - sudo apt install intel-oneapi-compiler-dpcpp-cpp libssl-dev + sudo apt install intel-oneapi-compiler-dpcpp-cpp libssl-dev ninja-build - name: install oneAPI MKL library shell: bash @@ -574,6 +585,7 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cmake -B build \ + -G "Ninja Multi-Config" \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx \ @@ -679,7 +691,7 @@ jobs: defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - build: 'vulkan-x64' arch: 'x64' - defines: '-DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' + defines: '-G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' - build: 'llvm-arm64' arch: 'arm64' defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' @@ -977,7 +989,7 @@ jobs: sudo apt-get update # Install necessary packages - sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential libssl-dev wget ccache git-lfs + sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential libssl-dev wget ccache git-lfs ninja-build # Set gcc-14 and g++-14 as the default compilers sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 @@ -1028,6 +1040,7 @@ jobs: id: cmake_build run: | cmake -B build \ + -G "Ninja" \ -DCMAKE_BUILD_TYPE=Release \ -DGGML_OPENMP=OFF \ -DLLAMA_BUILD_EXAMPLES=ON \ @@ -1079,12 +1092,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-low-perf: runs-on: ubuntu-22.04-arm @@ -1105,12 +1118,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-x64-cpu-high-perf: runs-on: ubuntu-22.04 @@ -1131,12 +1144,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf: runs-on: ubuntu-22.04-arm @@ -1157,12 +1170,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_HIGH_PERF=1 GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-high-perf-sve: runs-on: ubuntu-22.04-arm @@ -1183,12 +1196,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install build-essential + sudo apt-get install build-essential ninja-build - name: Test id: ggml-ci run: | - LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai: runs-on: ubuntu-22.04-arm @@ -1209,12 +1222,12 @@ jobs: id: depends run: | sudo apt-get update - sudo apt-get install -y build-essential + sudo apt-get install -y build-essential ninja-build - name: Test id: ggml-ci run: | - GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt ggml-ci-arm64-cpu-kleidiai-graviton4: runs-on: ah-ubuntu_22_04-c8g_8x @@ -1232,6 +1245,7 @@ jobs: sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \ apt-get install -y \ build-essential \ + ninja-build \ python3-venv \ gpg \ wget \ @@ -1262,4 +1276,5 @@ jobs: run: | GG_BUILD_KLEIDIAI=1 \ GG_BUILD_EXTRA_TESTS_0=1 \ + GG_BUILD_NINJA=1 \ bash ./ci/run.sh ./tmp/results ./tmp/mnt From 5bc9a63ae306b6ae63ffb1b1db715f377fbcbd5d Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 13:50:53 +0800 Subject: [PATCH 07/15] ci: add run.sh to test conditions to trigger GitHub CI and self-hosted runners Signed-off-by: Aaron Teo --- .github/workflows/build-self-hosted.yml | 1 + .github/workflows/build.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 2944cb8401..52cd850074 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -27,6 +27,7 @@ on: types: [opened, synchronize, reopened] paths: [ '.github/workflows/build-self-hosted.yml', + 'ci/run.sh', '**/CMakeLists.txt', '**/.cmake', '**/*.h', diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fe42dbed0..8a78677985 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,7 @@ on: paths: [ '.github/workflows/build.yml', '.github/workflows/build-cmake-pkg.yml', + 'ci/run.sh', '**/CMakeLists.txt', '**/.cmake', '**/*.h', From a923ae3977edc8c584fbb4625001727b87992db0 Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Tue, 24 Mar 2026 15:11:11 +0900 Subject: [PATCH 08/15] Enabled ninja build by default on self-hosted envs for experimentation --- .github/workflows/build-self-hosted.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 52cd850074..8905825ba6 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -68,7 +68,7 @@ jobs: id: ggml-ci run: | nvidia-smi - GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_CUDA=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp ggml-ci-nvidia-vulkan-cm: runs-on: [self-hosted, Linux, NVIDIA] @@ -82,7 +82,7 @@ jobs: id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp ggml-ci-nvidia-vulkan-cm2: runs-on: [self-hosted, Linux, NVIDIA, COOPMAT2] @@ -96,7 +96,7 @@ jobs: id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp # TODO: provision AMX-compatible machine #ggml-ci-cpu-amx: @@ -153,7 +153,7 @@ jobs: - name: Test id: ggml-ci run: | - GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_METAL=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-webgpu: runs-on: [self-hosted, macOS, ARM64] @@ -180,7 +180,7 @@ jobs: - name: Test id: ggml-ci run: | - GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \ + GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" GG_BUILD_NINJA=1 \ bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-vulkan: @@ -195,7 +195,7 @@ jobs: id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-linux-intel-vulkan: runs-on: [self-hosted, Linux, Intel] @@ -211,7 +211,7 @@ jobs: id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-intel-openvino-gpu-low-perf: runs-on: [self-hosted, Linux, Intel, OpenVINO] @@ -243,4 +243,4 @@ jobs: id: ggml-ci run: | source ./openvino_toolkit/setupvars.sh - GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt From 0a6263b1ee67e46023cfef33c81c213e5cb149c1 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 14:13:52 +0800 Subject: [PATCH 09/15] ci: revert generator to ninja instead of ninja multi-config Signed-off-by: Aaron Teo --- .github/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a78677985..3bce418e36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: run: | sysctl -a cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -120,7 +120,7 @@ jobs: # Metal is disabled due to intermittent failures with Github runners not having a GPU: # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313 cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -168,7 +168,7 @@ jobs: id: cmake_build run: | export CMAKE_PREFIX_PATH=dawn - cmake -B build -G "Ninja Multi-Config" -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF + cmake -B build -G "Ninja" -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) - name: Test @@ -232,7 +232,7 @@ jobs: id: cmake_build run: | cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DLLAMA_FATAL_WARNINGS=ON \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -284,7 +284,7 @@ jobs: id: cmake_build run: | cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -384,7 +384,7 @@ jobs: run: | export Dawn_DIR=dawn/lib64/cmake/Dawn cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_WEBGPU=ON cmake --build build --config Release -j $(nproc) @@ -423,7 +423,7 @@ jobs: run: | source emsdk/emsdk_env.sh emcmake cmake -B build-wasm \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_WEBGPU=ON \ -DLLAMA_OPENSSL=OFF \ -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg @@ -456,7 +456,7 @@ jobs: id: cmake_build run: | cmake -B build -S . \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \ -DGGML_HIP_ROCWMMA_FATTN=ON \ -DGGML_HIP=ON @@ -488,7 +488,7 @@ jobs: id: cmake_build run: | cmake -B build -S . \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_MUSA=ON cmake --build build --config Release -j $(nproc) @@ -536,7 +536,7 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx @@ -586,7 +586,7 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh cmake -B build \ - -G "Ninja Multi-Config" \ + -G "Ninja" \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx \ @@ -686,19 +686,19 @@ jobs: include: - build: 'cpu-x64 (static)' arch: 'x64' - defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF' + defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF' - build: 'openblas-x64' arch: 'x64' - defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - build: 'vulkan-x64' arch: 'x64' defines: '-G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' - build: 'llvm-arm64' arch: 'arm64' - defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' + defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' - build: 'llvm-arm64-opencl-adreno' arch: 'arm64' - defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON' + defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON' steps: - name: Clone @@ -867,7 +867,7 @@ jobs: # TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - cmake -S . -B build -G "Ninja Multi-Config" ^ + cmake -S . -B build -G "Ninja" ^ -DLLAMA_BUILD_SERVER=ON ^ -DLLAMA_BUILD_BORINGSSL=ON ^ -DGGML_NATIVE=OFF ^ From 3908b9675b23084370d842e1703751e518011c13 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 14:18:31 +0800 Subject: [PATCH 10/15] ci: install ninja-build for self-hosted workflows Signed-off-by: Aaron Teo --- .github/workflows/build-self-hosted.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 8905825ba6..f70c19e52a 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -64,6 +64,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -78,6 +83,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -92,6 +102,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -150,6 +165,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -163,6 +183,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Dawn Dependency id: dawn-depends run: | @@ -191,6 +216,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -207,6 +237,11 @@ jobs: with: persist-credentials: false + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Test id: ggml-ci run: | @@ -226,6 +261,11 @@ jobs: id: checkout uses: actions/checkout@v6 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build + - name: Setup OpenVINO Toolkit uses: ./.github/actions/linux-setup-openvino with: From c06031138fb866aaf0e69f434b5f59f61515e400 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 14:23:47 +0800 Subject: [PATCH 11/15] ci: revert ninja from self-hosted runners Signed-off-by: Aaron Teo --- .github/workflows/build-self-hosted.yml | 52 ++++--------------------- 1 file changed, 8 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index f70c19e52a..2510db7bdd 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -27,7 +27,6 @@ on: types: [opened, synchronize, reopened] paths: [ '.github/workflows/build-self-hosted.yml', - 'ci/run.sh', '**/CMakeLists.txt', '**/.cmake', '**/*.h', @@ -64,16 +63,11 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | nvidia-smi - GG_BUILD_CUDA=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp ggml-ci-nvidia-vulkan-cm: runs-on: [self-hosted, Linux, NVIDIA] @@ -83,16 +77,11 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp ggml-ci-nvidia-vulkan-cm2: runs-on: [self-hosted, Linux, NVIDIA, COOPMAT2] @@ -111,7 +100,7 @@ jobs: id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp + GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp # TODO: provision AMX-compatible machine #ggml-ci-cpu-amx: @@ -165,15 +154,10 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | - GG_BUILD_METAL=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-webgpu: runs-on: [self-hosted, macOS, ARM64] @@ -183,11 +167,6 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Dawn Dependency id: dawn-depends run: | @@ -205,7 +184,7 @@ jobs: - name: Test id: ggml-ci run: | - GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" GG_BUILD_NINJA=1 \ + GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \ bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-mac-vulkan: @@ -216,16 +195,11 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-linux-intel-vulkan: runs-on: [self-hosted, Linux, Intel] @@ -237,16 +211,11 @@ jobs: with: persist-credentials: false - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | vulkaninfo --summary - GG_BUILD_VULKAN=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp + GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp ggml-ci-intel-openvino-gpu-low-perf: runs-on: [self-hosted, Linux, Intel, OpenVINO] @@ -261,11 +230,6 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Setup OpenVINO Toolkit uses: ./.github/actions/linux-setup-openvino with: @@ -283,4 +247,4 @@ jobs: id: ggml-ci run: | source ./openvino_toolkit/setupvars.sh - GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 GG_BUILD_NINJA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt + GG_BUILD_OPENVINO=1 GGML_OPENVINO_DEVICE=GPU GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt From 231d441a4af34dbb024fd6bc47bcaae43b135a57 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 14:25:10 +0800 Subject: [PATCH 12/15] ci: missed one self-hosted step Signed-off-by: Aaron Teo --- .github/workflows/build-self-hosted.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 2510db7bdd..2944cb8401 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -91,11 +91,6 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build - - name: Test id: ggml-ci run: | From 7842cf622c34e6962b540d82f03ae5adf59a4524 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 14:33:58 +0800 Subject: [PATCH 13/15] ci: fix windows ci errors from an errenous revert Signed-off-by: Aaron Teo --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3bce418e36..8161d08d53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -686,19 +686,19 @@ jobs: include: - build: 'cpu-x64 (static)' arch: 'x64' - defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF' + defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF' - build: 'openblas-x64' arch: 'x64' - defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' + defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - build: 'vulkan-x64' arch: 'x64' - defines: '-G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' + defines: '-G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' - build: 'llvm-arm64' arch: 'arm64' - defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' + defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' - build: 'llvm-arm64-opencl-adreno' arch: 'arm64' - defines: '-G "Ninja" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON' + defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON' steps: - name: Clone From a987c02a567e735f7964df54457fc73a24dd220f Mon Sep 17 00:00:00 2001 From: "Nakasaka, Masato" Date: Tue, 24 Mar 2026 16:50:38 +0900 Subject: [PATCH 14/15] Added explicit build types for Ninja Also reverted some needless change --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8161d08d53..fc19bb9c84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,6 +82,7 @@ jobs: sysctl -a cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -121,6 +122,7 @@ jobs: # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313 cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_RPATH="@loader_path" \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_BORINGSSL=ON \ @@ -168,7 +170,7 @@ jobs: id: cmake_build run: | export CMAKE_PREFIX_PATH=dawn - cmake -B build -G "Ninja" -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF + cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) - name: Test @@ -233,6 +235,7 @@ jobs: run: | cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DLLAMA_FATAL_WARNINGS=ON \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -285,6 +288,7 @@ jobs: run: | cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_RPC=ON cmake --build build --config Release -j $(nproc) @@ -385,6 +389,7 @@ jobs: export Dawn_DIR=dawn/lib64/cmake/Dawn cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_WEBGPU=ON cmake --build build --config Release -j $(nproc) @@ -424,6 +429,7 @@ jobs: source emsdk/emsdk_env.sh emcmake cmake -B build-wasm \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_WEBGPU=ON \ -DLLAMA_OPENSSL=OFF \ -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg @@ -457,6 +463,7 @@ jobs: run: | cmake -B build -S . \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \ -DGGML_HIP_ROCWMMA_FATTN=ON \ -DGGML_HIP=ON @@ -489,6 +496,7 @@ jobs: run: | cmake -B build -S . \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_MUSA=ON cmake --build build --config Release -j $(nproc) @@ -537,6 +545,7 @@ jobs: source /opt/intel/oneapi/setvars.sh cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx @@ -587,6 +596,7 @@ jobs: source /opt/intel/oneapi/setvars.sh cmake -B build \ -G "Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ -DGGML_SYCL=ON \ -DCMAKE_C_COMPILER=icx \ -DCMAKE_CXX_COMPILER=icpx \ @@ -692,7 +702,7 @@ jobs: defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - build: 'vulkan-x64' arch: 'x64' - defines: '-G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' + defines: '-G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' - build: 'llvm-arm64' arch: 'arm64' defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON' @@ -867,7 +877,7 @@ jobs: # TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 - cmake -S . -B build -G "Ninja" ^ + cmake -S . -B build -G "Ninja Multi-Config" ^ -DLLAMA_BUILD_SERVER=ON ^ -DLLAMA_BUILD_BORINGSSL=ON ^ -DGGML_NATIVE=OFF ^ From b9cb6b651b8b0ac1ecc66faa2b8b9758c5a2c964 Mon Sep 17 00:00:00 2001 From: Aaron Teo Date: Tue, 24 Mar 2026 16:49:43 +0800 Subject: [PATCH 15/15] ci: use ninja multi-config for vulkan-x64 build Signed-off-by: Aaron Teo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc19bb9c84..ea0b6e15cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -702,7 +702,7 @@ jobs: defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"' - build: 'vulkan-x64' arch: 'x64' - defines: '-G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' + defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON' - build: 'llvm-arm64' arch: 'arm64' defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'