koboldcpp/docs
Daniel Bevenius 3bcfeb700f
cmake : add PCH and unity build to improve build times (#28091)
* scripts : add initial profiling script (wip)

* src : add precompile headers (PCH) for models.h

* common : add common.h as PCH

* ggml : add PCH for ggml-impl.h

* mtmd : use PCH for models.h

* scripts : add script to build with Server/Tools/Tests

* server : add PCH for common.h

* docs: add profiling progress notes (wip)

* ggml : add exclude for GCC + SVE on ARM

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/33393906061/job/99493756214?pr=28091

* ggml : attempt to fix use of std::hardware_destructive_inference_size

Refs: https://github.com/ggml-org/llama.cpp/actions/runs/33396221677/job/99501265689?pr=28091

* squash! ggml : attempt to fix use of std::hardware_destructive_inference_size

Add a version check for GCC 12 to conditionally apply the `-Winterference-size`
pragma.

* editorconfig : exclude profiling reports dir

This directory will not be included in the merge later and this commit
can be ignore at that point. Just fixing to keep CI happy.

* ggml : skip PCH for gcc on non-x86 architectures

* tests : add PCH for peg-parser/tests.h

There are 7 peg-parser tests that can share one PCH instead of then each
parsing the full tests.h.

* common : add PCH for chat.h

* docs : update linux build profiling full results

Just updating after a number of PCH additions. These are not exact
figures and will vary a bit from run to run, but they give a general idea
of the performance impact of PCH.

* cmake : introduce unity build for models

This commit introduces a unity build for the models to improve
compilation time.

The improvements were roughly the following:
```console
+------------------------+-----+------------+------------+------------+
| Build                  | TUs | Frontend   | Backend    | Total      |
+------------------------+-----+------------+------------+------------+
| Full,    master        | 396 |   811.0 s  |   692.2 s  | 1,503.2 s  |
| Full,    with PCH      | 405 |   380.0 s  |   664.7 s  | 1,044.7 s  |
| Full,    with PCH + UB | 264 |   357.7 s  |   635.7 s  |   993.4 s  |
+------------------------+-----+------------+------------+------------+

TU   = Translation Unit.
Full = includes Server, Tools, and Tests.
PCH  = precompiled headers.
UB   = unity build for models.
```

* docs : update linux profiling table with unitiy build results

* docs : update mac profiling results to include unity build [no ci]

* docs: remove profiling reports

* scripts : merge build profile scripts into one script

I was lazy before and just copied the first script to enable Tests,
Server, and Tools. This now merges them into a single script.

* Revert "editorconfig : exclude profiling reports dir" [no ci]

This reverts commit 2922a12118a0730d2f7632bcba265b44a0856c59.

* src : rename ggml_view_2d_slice to gemma3n_view_2d_slice

This is to be consistent with the rename in gemma4.cpp which was
required to avoid a name clash.

* cmake : add build profile script for windows [no ci]

This commit adds a port of the scripts/build-profile.sh script to
windows powershell.

This was developed on Windows on ARM but should work on X64 as well but
needs to be tested there as well.
2026-09-11 13:01:29 +02:00
..
android android: fix missing screenshots for Android.md (#18156) 2025-12-19 09:32:04 +02:00
backend sycl: attribute device allocations by site (GGML_SYCL_MEMTRACE) (#27631) 2026-09-04 22:36:02 -04:00
development model: use ggml_rope_set_offset() (#27382) 2026-08-21 18:54:29 +02:00
multimodal docs : fix duplicated "the" in granitevision and model-conversion docs (#23767) 2026-05-27 09:34:06 +02:00
ops ops: add Hexagon to ops.md and update main README.md (#28263) 2026-09-03 07:14:36 -07:00
android.md kleidiai : Update KleidiAI Documentation (#26078) 2026-09-01 10:45:13 +02:00
autoparser.md [Model] Support for Spark2_5ForCausalLM implementation (#27868) 2026-09-06 17:43:58 +02:00
build-profiling.md cmake : add PCH and unity build to improve build times (#28091) 2026-09-11 13:01:29 +02:00
build-riscv64-spacemit.md ci : update spacemit toolchain url and enhance curl command (#23642) 2026-05-25 10:43:24 +02:00
build-s390x.md ggml-cpu(s390x): add Q1_0 vector intrinsic support (#28606) 2026-09-10 09:50:28 +03:00
build.md CUDA: replace GGML_FA_ALL_QUANTS with GGML_FA_QUANTS, more control over what is compiled (#28079) 2026-09-09 12:50:08 +02:00
completions.md readme : refresh (#26280) 2026-07-30 16:14:37 +03:00
docker.md sycl : Improve SYCL doc (#23025) 2026-06-04 08:02:54 +03:00
function-calling.md docs: Update documentation with Granite 4.0/4.1 (#23404) 2026-05-22 20:35:46 +08:00
install.md docs: Adapt conda-forge package name (#26229) 2026-07-28 16:51:20 +02:00
llguidance.md llguidance build fixes for Windows (#11664) 2025-02-14 12:46:08 -08:00
models.md readme : refresh (#26280) 2026-07-30 16:14:37 +03:00
multi-gpu.md Write a readme on Multi-GPU usage in llama.cpp (#22729) 2026-05-07 17:48:40 +02:00
multimodal.md mtmd: refactor preprocessor, add mtmd_image_preproc_out (#24736) 2026-06-18 12:04:39 +02:00
ops.md ops: add Hexagon to ops.md and update main README.md (#28263) 2026-09-03 07:14:36 -07:00
preset.md common: add system-level config file (#26118) 2026-08-13 00:02:27 +02:00
release.md ci : allow make-release to target a specific commit (#27234) 2026-08-17 11:52:46 +03:00
speculative.md spec: Add benchmark-only synthetic speculative acceptance options (#27711) 2026-08-27 13:53:42 +03:00
xcframework.md readme : refresh (#26280) 2026-07-30 16:14:37 +03:00