ci.yml has no GPU, and the HRX correctness bugs #308 #309 #310 #313 #318
#319 #369 #370 were all found by hand. The new hw-gate workflow runs
scripts/hw-gate.sh on the strixhalo-engine runner for PRs labelled
hw-gate, every bump-hrx/* PR, and by hand (workflow_dispatch with a ref,
posting the hw-gate commit status).
The gate builds the pinned HRX pair and runs test-backend-ops -b HRX0 on
the ops those bugs touched, tools/kat.py check on Qwen3-0.6B, ZAYA1-8B and
Qwen3.8-27B against goldens recorded at the release pin (main d2a56a4,
llama.cpp 0e255d77, hrx-system 98d05d94), KLD against stored base logits
(512 x 8 chunks) and the 4.7K-token needle. Each GPU step holds
~/npu.lock only while it runs, waits for a cool box and an idle coder-llm,
runs under mem-guard and thermal-run, and is refused by a
tools/mem_budget.py pre-check when it would reach the engine#315 GTT zone.
kat (copied from the amd-oss tool, ours) now sends cache_prompt false on
every determinism repeat and checks the cached path separately (WARN on a
near-tie, FAIL when the margin is large or the answer is lost).
tests/hrx_long_prompt.py now passes enable_thinking through
chat_template_kwargs: the current llama-server ignores the top-level flag
and the probe got an empty reply at the release pin.
kat goldens are in tests/golden/hw-gate; the KLD base logits (0.6-1 GB
each) stay on the gate box, pinned by sha256 in manifest.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds an HRX correctness gate that runs on the Strix Halo GPU before merge (ARCH-GAPS goal P2, gap G2).
ci.ymlhas no GPU, and the HRX bugs #308 #309 #310 #313 #318 #319 #369 #370 were all found by hand.Workflow:
.github/workflows/hw-gate.yml, jobhw_gate, on the self-hosted runnerstrixhalo-engine. It runs for:hw-gate;bump-hrx/*PR;workflow_dispatchwith a ref; posts thehw-gatecommit status).Fork PRs never run. Actions are SHA-pinned, permissions are
contents: read, plusstatuses: writefor the by-hand status.Gate (
scripts/hw-gate.sh): builds the pinned HRX pair (same configuration ascmake/hrx.cmake), then:test-backend-ops -b HRX0on MUL_MAT, MUL_MAT_ID, FLASH_ATTN_EXT, GATED_DELTA_NET, SSM_CONV, GET_ROWS, ROPE, RMS_NORM and SOFT_MAX, in one run. The known HRX: intermittent MUL_MAT f32 m=1 n=1 k=2048 error on common.mul_mat.f32_f32_decode (about 1 in 40 runs at fork tip e44c9d0) #370 flake is re-run alone 3x.tools/kat.py checkon Qwen3-0.6B, ZAYA1-8B and Qwen3.8-27B against goldens recorded at the release pin (main d2a56a4, llama.cpp 0e255d77, hrx-system 98d05d94).llama-perplexity --kl-divergence, 512 tokens x 8 chunks).tests/hrx_long_prompt.py).Box rules: each GPU step (ops, then one per model) holds
~/npu.lockonly while it runs. Before starting, each step:tools/mem_budget.pypre-check that refuses anything reaching the engine#315 GTT zone (>= 95 GiB) or MemAvailable.Each step then runs under
scripts/mem-guard.shand~/lb/thermal-run.sh. New amdgpu ring timeouts are reported. Running on the pr-agent runner means no PR-Agent review generates during the gate.Goldens:
tests/golden/hw-gate/.~/.cache/hw-gate/kld, pinned by sha256 plus model and text fingerprints intests/golden/hw-gate/manifest.json. The gate refuses a mismatch. Spare copy: ryzen~/backups/hw-gate-kld-0e255d77.Fixes included:
tools/kat.py(ours, copied from amd-oss with the header): every determinism repeat now sendscache_prompt: false. The fresh-vs-cached path is a separate check: a WARN with the diverging token and the top-2 margin on a near-tie, a FAIL when the margin is > 1.0 or the cached run loses an answer the fresh run got. A case the golden itself misses is held to the golden text.tests/hrx_long_prompt.pypassesenable_thinkingthroughchat_template_kwargs. At the release pin the current llama-server ignores the top-level flag, so Qwen3 spent all 16 tokens thinking and the probe got an empty reply. With the kwarg it answers 7341.hw_gate_judges: kat and the KLD judge against a fake server and synthetic logs, no GPU.Measured on main d2a56a4 (shared box, about ten GPU jobs queueing on the lock):
That is about 13 min of GPU time. Each lock acquisition waited 10-60 min, because flock is not FIFO; the summary reports waiting and holding separately.
Pending a lock window (the release-blocking fixes have GPU priority): 3 clean full runs on main, and the revert test. The scratch build that re-introduces #319 (fork b4e7515 reverted on 0e255d77, worktree strixhalo
~/wt/hw-gate-revert319, never pushed) is built and ready forscripts/hw-gate.sh --bin ~/wt/hw-gate-revert319/build-gate/bin. After that, thehw-gatelabel goes on this PR for the CI run. Not for merge before those results.🤖 Generated with Claude Code