From 4f38e6dffd98a0eb076b0aecad4243387c19bb15 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sat, 14 Nov 2026 10:36:01 -0400 Subject: [PATCH] hw-gate: audit the add-on's f16 narrowing at the pin it just fetched engine#2406 put "audit those on a pin bump" on the f16 ratchet's green line, and nothing ran it: hrx_f16_narrowing walks *.loom only, and the two places a tree could exist both declined -- CI has no gpu-kernels checkout (so the ctest row always takes the 77 path) and scripts/hw-gate.sh fetches the add-on at :444 and never asked. Measured before this: grep -n 'ctest|hip_f16_audit' scripts/hw-gate.sh -> nothing, grep -rn gpu-kernels .github/workflows -> nothing. This is the flow that already pays for the checkout, so it is the 'on a pin bump' moment: after fetch-private.sh resolves the pin, audit that tree with --expect-sha, which refuses a tree that is not the pin (rc 2) instead of reporting a different tree as clean. Three arms measured with the real tool: tree at the pin -> rc 0 (68 files, 0 f16 accumulator, 62 narrowings); tree one pin back -> rc 2 'this tree is at b0ed2060e413, --expect-sha says 96593660718d'; no tree -> rc 2 'not a git checkout - cannot tell which commit is audited'. A failure exits the gate with the first six lines of the audit in the log. --- scripts/hw-gate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/hw-gate.sh b/scripts/hw-gate.sh index 4ad0e7a81..8902b9c22 100755 --- a/scripts/hw-gate.sh +++ b/scripts/hw-gate.sh @@ -452,6 +452,16 @@ if [ -z "$BIN" ]; then # the add-on's own check (the ops phase runs it) targets+=(ggml-hrx-fa-decode-bench) note "private HIP kernels: gpu-kernels ${addon_pin:0:12} (addons/hip-hrx)" + # engine#2406 put "audit the add-on's f16 narrowing on a pin bump" on the f16 ratchet's green line and + # nothing ran it: the ratchet walks *.loom only, and this is the one flow that already has the tree (CI has + # no checkout, so its row always takes the 77 path). Auditing here is the "on a pin bump" moment, and + # --expect-sha makes it refuse a tree that is not the pin it just fetched rather than reporting clean. + if ! python3 "$ROOT/tools/ci/hip_f16_audit.py" --dir "$addon" --expect-sha "$addon_pin" > "$OUT/hip-f16-audit.txt" 2>&1; then + note "::error::the gpu-kernels add-on at ${addon_pin:0:12} fails the f16 audit (see hip-f16-audit.txt)" + sed -n '1,6p' "$OUT/hip-f16-audit.txt" | sed 's/^/ /' + exit 2 + fi + note "add-on f16 audit: $(grep -c . "$OUT/hip-f16-audit.txt") line(s), no f16 accumulator" fi # configure once per add-on pin (a new pin can add kernel files the old configure never saw); # otherwise ninja re-runs cmake itself when a CMakeLists.txt changes