llama.cpp/scripts
thelittlefireman fd4b137e38
CI: add Hip occupancy check and small static analysis report (#32365)
* ci: check for occupancy regressions vs master in HIP quality check

Add scripts/hip/gcn-cdna-occupancy-check.py, which compares per-kernel
occupancy between two GGML_HIP_EXPORT_METRICS build logs and fails when
a kernel drops occupancy. Wire it into the HIP quality check workflow:
the baseline (master) is built with the same target and flags, then
compared against the PR build.

Assisted-by: Hermes Agent

* ci: reuse spill-check build and cache master baseline for occupancy check

The PR-side metrics.log is shared with the VGPR spill check, so the
occupancy comparison adds no extra PR build. The master baseline metrics
log is cached by master-push runs and restored on PRs; it is only
rebuilt as a fallback when the master tip has no cached baseline.

* ci: report occupancy and spill changes as a markdown artifact

Extend gcn-cdna-occupancy-check.py to also compare per-kernel VGPR and
SGPR spills, and add a --report option that writes a markdown report
with all regressions and improvements. The workflow uploads the report
as an artifact on PRs, even when the check fails.

* ci: split metrics check and markdown report into separate scripts

gcn-cdna-metrics-check.py compares per-kernel occupancy and spills and
can dump all deltas as TSV; gcn-cdna-metrics-report.py generates the
markdown report from that dump. The workflow runs both on PRs and
uploads the report as an artifact.

* ci: consolidate HIP kernel metrics checks using Clang YAML remarks

Merge VGPR threshold, occupancy/spill comparison, and Markdown reporting
into one script with unchanged checking rules and output formats. Parse
per-kernel optimization records instead of interleaved text diagnostics.
Add unit tests and update the CI baseline cache to contain YAML records.

* ci: preserve comparison kernel selection and fix Python indentation

Count only kernels with occupancy or spill remarks, as before the YAML
migration. Add a regression test for VGPR-only records and fix flake8.

* ci: fix Python type checking for HIP metrics scripts

Cast metric entries to lists before appending and check the dynamic
module spec and loader are available before executing the tests.
Preserve existing checks and reports.

* ci: add blocking and warning HIP kernel regression rules

Preserve the VGPR limit and its exemptions, block spill increases and
occupancy drops with increasing VGPRs, and warn on occupancy-only drops.
Collect all findings and generate the report before failing CI.

Request device optimization records explicitly and bypass ccache during
metrics builds; print YAML diagnostics to investigate missing kernel
resource remarks in ROCm 7.2.1.

* ci: preserve device-only HIP optimization records

Do not enable host remarks: Clang writes host and device optimization
records to the same output path. Filter the device records to kernel
resource usage and validate the compiler output before expensive builds.
Invalidate old baseline caches and avoid reporting a missing TSV.

* ci: include HIP runtime in metrics probe

Assisted-by: ChatGPT

* ci: build only ggml-hip for kernel metrics and propagate build errors

Assisted-by: ChatGPT

* ci: match HIP baseline to merge commit and publish job summary

Assisted-by: ChatGPT

* ci: trust the HIP CI checkout directory before resolving baseline

Assisted-by: ChatGPT

* ci: cache HIP baseline metrics in HF buckets

Assisted-by: ChatGPT

* ci: publish HIP metrics report to logs and job summary

Assisted-by: ChatGPT

* Ci: hip auto clean every 30 days

Assisted-by: ChatGPT

* Update .github/workflows/hip-quality-check.yml

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>

* ci: fix conflits and rebase

Assisted-by: ChatGPT

---------

Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
2026-11-26 14:50:32 +02:00
..
apple scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
hip CI: add Hip occupancy check and small static analysis report (#32365) 2026-11-26 14:50:32 +02:00
jinja ci : bump ty to 0.0.100 (#32030) 2026-11-10 21:54:14 +01:00
snapdragon ggml-hexagon 2.0 : support for int-hmx, automatic f32 -> f16 lowering, and generic dma pipelines (#32582) 2026-11-25 20:59:59 -08:00
bench-models.sh common: migrate the deprecated --mmap/--no-mmap to --load-mode (#26934) 2026-08-15 16:35:53 +08:00
build-info.sh llama : reorganize source code + improve CMake (#8006) 2024-06-26 18:33:02 +03:00
build-profile.ps1 cmake : add PCH and unity build to improve build times (#28091) 2026-09-11 13:01:29 +02:00
build-profile.sh cmake : add PCH and unity build to improve build times (#28091) 2026-09-11 13:01:29 +02:00
ccache-clear.sh ci : apply ccache-clear with older/min/dry-run to all ccache jobs (#27602) 2026-08-24 10:49:20 +03:00
chat_tts_norm.py chat: add tts_dict for kokoro G2P template (#32397) 2026-11-17 12:52:50 +01:00
check-apiabi-compat.sh ci: Fix --strict mode for API check (#30623) 2026-10-20 13:38:45 +03:00
check-release-apiabi.sh ci : added ABI reports as github artifact (#30619) 2026-10-17 11:41:53 +02:00
check-requirements.sh scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
ci-status.sh scripts : add ci-status.sh to list active CI runs (#30586) 2026-10-15 16:28:09 +03:00
compare-commits.sh scripts: add sqlite3 check for compare-commits.sh (#15633) 2025-08-28 19:23:22 +08:00
compare-llama-bench.py args: refactor mlock/mmap/directio into load-mode (#20834) 2026-07-23 20:32:56 +08:00
compare-logprobs.py server: use port 9931 by default (#30159) 2026-10-09 10:40:03 +02:00
connect-download.cmake server: add --connect, allow p2p access to server outside LAN (#28277) 2026-10-20 00:23:14 +02:00
create_ops_docs.py Docs: add instructions for adding backends (#14889) 2025-07-27 09:36:43 +08:00
debug-test.sh refactor : remove libcurl, use OpenSSL when available (#18828) 2026-01-14 18:02:47 +01:00
gen-authors.sh scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
gen-unicode-data.py unicode : add opt-in NFC normalization for Unigram tokenizers (#30390) 2026-10-14 08:33:24 +03:00
get-flags.mk build : pass all warning flags to nvcc via -Xcompiler (#5570) 2024-02-18 16:21:52 -05:00
get-hellaswag.sh scripts : update get-hellaswag.sh and get-winogrande.sh (#20542) 2026-03-14 11:21:50 +01:00
get-pg.sh scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
get-wikitext-2.sh scripts : improve get-wikitext-2.sh (#19952) 2026-03-02 15:40:49 +01:00
get-winogrande.sh scripts : update get-hellaswag.sh and get-winogrande.sh (#20542) 2026-03-14 11:21:50 +01:00
get_chat_template.py scripts: corrected encoding when getting chat template (#11866) (#11907) 2025-02-18 10:30:16 +01:00
git-bisect-run.sh llama: end-to-end tests (#19802) 2026-03-08 12:30:21 +01:00
git-bisect.sh llama: end-to-end tests (#19802) 2026-03-08 12:30:21 +01:00
hf.sh scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
install-oneapi.bat support SYCL backend windows build (#5208) 2024-01-31 08:08:07 +05:30
make-release-checks.sh ci : skip container re-tagging when Require Docker is disabled (#30008) 2026-10-05 21:22:08 +03:00
make-release-desc.sh scripts : make-release-desc - link previous release in changelog title (#29336) 2026-09-24 07:46:38 +03:00
make-release-summary.txt ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
moe-cache-tune.py server : handle CTRL_BREAK_EVENT on Windows for clean shutdown (#32080) 2026-11-25 16:59:01 +05:30
pr2wt.sh pi : turn .pi/gg into a system prompt addendum (#30762) 2026-10-19 09:11:13 +03:00
release.sh scripts : add release.sh for release preparation (#27497) 2026-08-21 14:51:26 +03:00
serve-static.js refactor : remove libcurl, use OpenSSL when available (#18828) 2026-01-14 18:02:47 +01:00
server-bench.py server-bench : fix TypeError in histogram generation (#32518) 2026-11-20 15:16:52 +01:00
server-test-function-call.py server: use port 9931 by default (#30159) 2026-10-09 10:40:03 +02:00
server-test-model.py server: use port 9931 by default (#30159) 2026-10-09 10:40:03 +02:00
server-test-parallel-tc.py server: use port 9931 by default (#30159) 2026-10-09 10:40:03 +02:00
server-test-structured.py server: use port 9931 by default (#30159) 2026-10-09 10:40:03 +02:00
sync-ggml-am.sh scripts : update sync scripts 2025-08-18 22:06:44 +03:00
sync-ggml.last sync : ggml 2026-11-26 09:38:27 +02:00
sync-ggml.sh scripts : update sync scripts 2025-08-18 22:06:44 +03:00
sync_vendor.py vendor : update cpp-httplib-0.67.0 [no ci] (#32563) 2026-11-18 21:00:31 +01:00
tool_bench.py ci : bump ty to 0.0.100 (#32030) 2026-11-10 21:54:14 +01:00
tool_bench.sh scripts : make the shell scripts cross-platform (#14341) 2025-06-30 10:17:18 +02:00
ui-assets.cmake ui: fix prebuilt UI download in shallow clones (#32952) 2026-11-24 17:34:34 +01:00
verify-checksum-models.py convert.py : add python logging instead of print() (#6511) 2024-05-03 22:36:41 +03:00
wc2wt.sh pi : turn .pi/gg into a system prompt addendum (#30762) 2026-10-19 09:11:13 +03:00