Skip to content

ci: run the fork's test-hrx-* rows from the HRX job (engine#2836) - #2857

Merged
bong-water-water-bong merged 2 commits into
mainfrom
ci/fork-ctest-rows
Nov 17, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
ci/fork-ctest-rows

Conversation

@bong-water-water-bong

@bong-water-water-bong bong-water-water-bong commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

ci: run the fork's test-hrx-* rows from the HRX job (engine#2836)

What

third_party/llama.cpp registers its test-hrx-* rows inside if (TARGET ggml-hrx), and nothing built
or ran one of them: cmake/hrx.cmake's ExternalProject builds three binaries by name (llama-server llama-bench llama-perplexity) and never passed LLAMA_BUILD_TESTS, so the rows existed in the fork's
tree and executed only when a person ran ctest in a fork checkout. #2840 made one of them (the python
stale-expectation check) run from the engine's suite; this makes the compiled rows run.

file change
CMakeLists.txt option(ONEBIT_HRX_BUILD_TESTS "…" OFF)
cmake/hrx.cmake ExternalProject forwards -DLLAMA_BUILD_TESTS=${ONEBIT_HRX_BUILD_TESTS}
.github/workflows/hrx-build.yml configures with it on, builds the fork tree, runs the existing row
tools/ci/ctest_known_fail.py two parse gaps that made the ratchet answer "cannot tell"
tools/ci/ctest_known_fail.txt the measured failures

ONEBIT_HRX_BUILD_TESTS has to be a configure-time decision — the rows do not exist otherwise — and it
stays OFF for lane builds so they do not pay for 34 extra binaries. The runner-up: a script reading
ctest -N and building rows by name. Not needed — the engine already has the row for this
(fork_ctest_known_fail, CMakeLists.txt:305), which skips 77 in ci.yml (no HRX tree) and applies the
known-failure ratchet where there is one. So the job runs that row instead of re-implementing it.

IREE_HAL_AMDGPU_LIBHSA_PATH is exported from the cache in the step, because a ctest row inherits no
engine environment and HRX dlopens the runtime: without it the distro's libhsa-runtime64 (no
hsa_amd_queue_create) makes every device row fail with test skipped: no device available — a FAIL,
because the fork registers that string as a failing regex on purpose.

The ratchet could not read a real log

Both fixes are needed for the row to answer at all, and both were measured on a real run:

  1. ctest pads a LABELS column after the reason parens — 85 - test-hrx-buffer (Failed) hrx — and
    FAILED_LINE required end-of-line after ), so those rows were dropped and the count disagreed with
    the summary: the summary says 17 failed, the FAILED block lists 15 -- one of the two is truncated.
  2. Not Run was filtered out as a skip, but ctest counts it in M tests failed, so any unbuilt binary
    made every log unreadable — and the baseline has carried test-hrx-host-resident # Not Run all along.
    Skipped/Disabled stay excluded, as the existing comment requires.

After both: ctest_known_fail: 26 known failure(s), no new ones, rc 0, on the measured log.

Measured, ryzen 2026-11-17, gfx1201, GTT 22.6 GiB, GGML_HRX_GTT_RESERVE_MB=1024, SDK HSA runtime

37 rows registered, 20 pass. The failures split three ways:

  • 11 rows, one class: requirement failed: ggml_backend_supports_op(backend, rows) — the backend has
    no kernel for a row op (mxfp4, nvfp4, q2_0, get-rows-iq, hadamard, decode-stride, fa-transposed-value,
    attention-q-decode-head-size, mul-mat-id-k32, fa-masked-v, routed-down-loom). That is engine#2774/hrx: IQ1_S has no prefill matcher, so a 1-bit 27B prefills at 4.8 tok/s against 12.5 tok/s decode (measured, servable otherwise) #2832
    seen from the fork's side, and these rows turn them into named reds instead of a green fleet.
  • test-hrx-host-resident does not compile at this pin: the target compiles
    ggml/src/ggml-hrx/host-weight-placement.cpp without ggml/src on its include path, so
    backend-context.h:3's ggml-backend-impl.h is not found. Baselined as Not Run; the fix is one
    target_include_directories in the fork and belongs in 1bit-MONSTER/llama.cpp, not here.
  • 5 rows measured red with no single cause yet (pool-refusal-budget, loom-jit,
    external-window-view, plus ops/ops-loom, which the script's -E keeps out because 271 cases take
    694 s).

Every one is written down with its reason in tools/ci/ctest_known_fail.txt, so the job lands green and a
NEW failure fails it.

Row count moved with the pin

The issue counted 43 rows at ddd415f4a. At the current pin the fork's build registers 37 (its
tests/CMakeLists.txt has 38 add_test(NAME test-hrx-… occurrences; test-hrx-routed-down-hip and
-q4k need GGML_HIP=ON). The job reads the count from the build rather than asserting a constant.

Also measured on the way

Two environment traps that a person running this by hand hits and a CI job would have hit too: the wrong
HSA runtime, and GTT total 22.6 GiB with 22.6 GiB free leaves nothing under the 6.6 GiB ceiling (reserve GGML_HRX_GTT_RESERVE_MB …) on a box whose GTT is fully free — the guardrail's ceiling is computed from a
reserve that does not account for a large idle pool.

37 `test-hrx-*` rows are registered in the fork's `tests/CMakeLists.txt` inside `if (TARGET ggml-hrx)`,
and nothing built or ran one of them: `cmake/hrx.cmake`'s ExternalProject builds three binaries by name
and never passed `LLAMA_BUILD_TESTS`. #2840 made one of them (the python stale-expectation check) run
from the engine's suite; this makes the compiled rows run.

- `ONEBIT_HRX_BUILD_TESTS` (OFF): forwards `-DLLAMA_BUILD_TESTS` to the fork's configure. It has to be
  a configure-time decision -- the rows do not exist otherwise -- and it stays off for lane builds so
  they do not pay for 34 extra binaries.
- `hrx-build.yml`: configures with it on, builds the fork tree, and runs the row that already exists for
  this (`fork_ctest_known_fail`, CMakeLists.txt:305). That row skips 77 in `ci.yml` (no HRX tree) and
  applies the known-failure ratchet here.
- It exports `IREE_HAL_AMDGPU_LIBHSA_PATH` from the cache: a ctest row inherits no engine environment and
  HRX dlopens the runtime, so without it the distro's libhsa-runtime64 (no `hsa_amd_queue_create`) makes
  every device row fail with "test skipped: no device available" -- a FAIL, because the fork registers
  that string as a failing regex.
- `ctest_known_fail.py`: two parse gaps made the ratchet answer "cannot tell" on a real log, which is the
  failure it exists to prevent. (1) ctest pads a LABELS column after the reason parens
  (`  85 - test-hrx-buffer (Failed)     hrx`), and requiring end-of-line dropped those rows, so the count
  disagreed with the summary. (2) `Not Run` was dropped as a skip, but ctest counts it in "M tests
  failed", so any unbuilt binary made the log unreadable -- and the baseline already carries
  `test-hrx-host-resident # Not Run`. `Skipped`/`Disabled` stay excluded.
- `ctest_known_fail.txt`: the measured failures, one per line with the reason.

MEASURED on ryzen 2026-11-17 (gfx1201, GTT 22.6 GiB, `GGML_HRX_GTT_RESERVE_MB=1024`, SDK HSA runtime):
37 rows registered, 20 pass. 11 of the failures are one class -- `ggml_backend_supports_op(backend, rows)`
false for a row op the backend has no kernel for (engine#2774/#2832). `test-hrx-host-resident` does not
compile at this pin: its target compiles `ggml/src/ggml-hrx/host-weight-placement.cpp` without `ggml/src`
on the include path, so `backend-context.h:3`'s `ggml-backend-impl.h` is not found; it is baselined as
`Not Run` and the fork-side include fix is a separate PR. `test-hrx-ops`/`-loom` (271 cases, 694 s) stay
excluded by the script's `-E`.

Row count moved with the pin: the issue counted 43 at `ddd415f4a`; at the current pin the build registers
37 (38 `add_test(NAME test-hrx-…` occurrences, two of which need `GGML_HIP=ON`).
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 9eb64ca)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

2832 - Partially compliant

Compliant requirements:

  • Enabled building and running the test-hrx-* rows from the HRX job
  • Updated the CI configuration to build and run the test rows
  • Updated the known failure tracking to include relevant test failures

Non-compliant requirements:

  • The missing prefill matcher for IQ1_S format is not addressed by this PR

Requires further human verification:

  • Verification that the prefill matcher for IQ1_S is actually implemented and functional
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing prefill matcher for IQ1_S

The PR enables building and running the test-hrx-* rows but does not actually implement the prefill matcher for IQ1_S format. The ticket describes that IQ1_S has no prefill matcher, causing it to fallback to CPU prefill at 4.8 tok/s instead of GPU decode performance at 12.5 tok/s. This issue remains unaddressed in the current changes.

-DLLAMA_BUILD_TESTS=${ONEBIT_HRX_BUILD_TESTS}
Missing kernel support for IQ1_S prefill

The known failure baseline includes test-hrx-get-rows-iq which indicates that the backend lacks kernel support for the IQ get-rows operation (engine#2832). This confirms that the underlying issue of missing prefill support for IQ1_S is still present and not resolved by this PR.

test-hrx-decode-stride                 # Subprocess aborted -- measured in hrx-build 2026-11-17 (37 rows, 20 pass); the other 10 supports_op reds there PASS, they only red out under GGML_HRX_GTT_RESERVE_MB=1024
✅ Resolved findings

tools/ci/ctest_known_fail.txt:40-50

Known Failure Baseline

The known failure baseline was updated to include several test-hrx-* rows that are failing due to missing kernel support (ggml_backend_supports_op returning false). This includes test-hrx-get-rows-iq which is directly related to the issue described in engine#2832 (missing kernel for IQ get-rows op). This ensures that these failures are tracked and do not cause false positives in the CI system.

.github/workflows/hrx-build.yml:138-164

Test Execution

The workflow now includes a step to run the fork's own ctest rows (fork_ctest_known_fail) after building the HRX components. This ensures that the test rows that were previously not executed are now run as part of the CI process, including the tests for IQ1_S prefill functionality.

CMakeLists.txt:1056

New Build Option

A new CMake option ONEBIT_HRX_BUILD_TESTS was added to control whether the HRX llama.cpp is configured with LLAMA_BUILD_TESTS=ON. This option is OFF by default to avoid the overhead of building 43 extra binaries in lane builds, but is enabled in the hrx-build.yml workflow to run the test rows.

cmake/hrx.cmake:232

Test Build Configuration

The ExternalProject configuration for building the HRX llama.cpp now includes -DLLAMA_BUILD_TESTS=${ONEBIT_HRX_BUILD_TESTS}. This change is necessary to enable the registration of the test-hrx-* rows in the fork's test suite, which were previously not built or executed.

tools/ci/ctest_known_fail.py:118-124

Skipped Test Filtering

The logic for filtering skipped tests was updated to properly handle cases where tests are marked as "Not Run" by ctest. This is important because "Not Run" tests are counted in the failure summary but should not be treated as actual failures in the ratchet system. This change prevents false positives in the known failure tracking.

tools/ci/ctest_known_fail.py:78

Regex Pattern Update

The regex pattern for parsing failed test lines was updated to handle the new LABELS column format added by ctest in engine#2836. This change ensures that test rows with labels are properly parsed and do not cause the ratchet to incorrectly identify logs as truncated. The change is necessary to maintain the integrity of the known failure tracking system.

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 0c81dd9

37 `test-hrx-*` rows are registered in the fork's `tests/CMakeLists.txt` inside `if (TARGET ggml-hrx)`,
and nothing built or ran one of them: `cmake/hrx.cmake`'s ExternalProject builds three binaries by name
(`llama-server llama-bench llama-perplexity`) and never passed `LLAMA_BUILD_TESTS`. #2840 made one of them
(the python stale-expectation check) run from the engine's suite; this makes the compiled rows run.

- `ONEBIT_HRX_BUILD_TESTS` (OFF): forwards `-DLLAMA_BUILD_TESTS` to the fork's configure. It has to be a
  configure-time decision -- the rows do not exist otherwise -- and it stays off for lane builds so they
  do not pay for 34 extra binaries.
- `hrx-build.yml`: configures with it on, builds the fork tree with `-k 0`, and runs the row that already
  exists for this (`fork_ctest_known_fail`, CMakeLists.txt:305). That row skips 77 in `ci.yml` (no HRX
  tree) and applies the known-failure ratchet here, so the job does not re-implement it.
- It exports `IREE_HAL_AMDGPU_LIBHSA_PATH` from the cache: a ctest row inherits no engine environment and
  HRX dlopens the runtime, so with the distro's libhsa-runtime64 (no `hsa_amd_queue_create`) every device
  row reads `test skipped: no device available` -- a FAIL, because the fork registers that string as a
  failing regex.
- `-k 0` because one row does not build at this pin: `test-hrx-host-resident` compiles
  `ggml/src/ggml-hrx/host-weight-placement.cpp` without `ggml/src` on its include path, so
  `backend-context.h:3`'s `ggml-backend-impl.h` is not found, and ninja otherwise stops all 34 binaries.
  The failure is not swallowed: ctest reports that row as `Not Run` and the baseline names it.
- `ctest_known_fail.py`: three parse gaps made the ratchet answer "cannot tell" on a real log, which is
  the failure it exists to prevent. (1) ctest pads a LABELS column after the reason parens
  (`  38 - test-llama-context (Subprocess aborted)   main behavior backend`), and `FAILED_LINE` required
  end-of-line after `)`, so those rows were dropped and the count disagreed with the summary. (2) `Not
  Run` was filtered as a skip although ctest counts it in "M tests failed", so any unbuilt binary made the
  log unreadable -- and the baseline had been carrying `test-hrx-host-resident # Not Run` all along. The
  trailing-label match is `[ \t]+`, not `\s+`: `\s` spans newlines and swallows the following entries.
- `ctest_known_fail.txt`: the rows measured red, each with its reason.

MEASURED, hrx-build on ryzen 2026-11-17 (111 rows after the script's `-E`): **8 red, 103 pass**, and
before this PR zero of the `test-hrx-*` rows were built or run at all. At a GTT-reserve-1024 setting, 11
further rows red out with `requirement failed: ggml_backend_supports_op(backend, rows)` -- the kernel gaps
of #2774/#2832 -- which is where those names come from; they pass on the runner's default reserve, so they
are not baselined here.

Row count moved with the pin: the issue counted 43 at `ddd415f4a`; the fork registers 37 at the current
pin (38 `add_test(NAME test-hrx-…` occurrences, two of which need `GGML_HIP=ON`).
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 9eb64ca

@bong-water-water-bong
bong-water-water-bong merged commit ce08501 into main Nov 17, 2026
12 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the ci/fork-ctest-rows branch November 17, 2026 19:10
bong-water-water-bong pushed a commit that referenced this pull request Nov 18, 2026
The fork's ctest run on #2865 reported 9 failures of 111: the eight the
baseline already named, plus test-hrx-loom-jit and hrx-loom-jit-test. Both
abort in the same way in the 2026-11-17 gfx1201 sweep, so they are not new;
the baseline simply never listed them because #2857 only transcribed rows
that one CI log happened to show.

engine#2761 is where these belong; this only stops an unlisted red from
failing the job.
bong-water-water-bong added a commit that referenced this pull request Nov 18, 2026
* ci: pin hrx at the IQ1_S producer arm (engine#2832)

* registry: record the fork at the IQ1_S arm pin

* ci: name the two loom-jit rows the baseline was missing

The fork's ctest run on #2865 reported 9 failures of 111: the eight the
baseline already named, plus test-hrx-loom-jit and hrx-loom-jit-test. Both
abort in the same way in the 2026-11-17 gfx1201 sweep, so they are not new;
the baseline simply never listed them because #2857 only transcribed rows
that one CI log happened to show.

engine#2761 is where these belong; this only stops an unlisted red from
failing the job.

* ci: re-pin the IQ1_S arm at a fork commit that links

The pin at 831ed614 selects a motif that calls @ggml_kquant_grid_fill_for
(defined in ops/kquant_decode_f32.loom) and @ggml_iq1s_f16_pair (defined in
motifs/kquant_iq1_s.loom) without declaring either module in any of the 22
exports that compile the motif, so the Loom root link fails and every q4_K /
q6_K prefill launch is refused:

  LINK/MATERIALIZE: unresolved exact declaration '@ggml_kquant_grid_fill_for'

That is why hw_gate was 3593/3604 against 3604/3604 on the parent.  The fork
commit 8c23f152 calls the motif's own @ggml_kquant_iq1s_grid_fill and declares
motifs/kquant_iq1_s.loom in all 22 recipes.  No kernel arithmetic changes:
the arm stays keyed where 831ed614 put it, which stage A corrects separately.

test-backend-ops -b HRX0 -o MUL_MAT,MUL_MAT_ID on that tree: 2642/2642.

* registry: regenerate at the re-pinned fork commit

The recorded source hash carried the right 9-character prefix and a wrong
tail, so registry_pins compared two different hashes that printed the same
and registry_content found the file stale. Regenerated with
tools/registry_build.py in a tree whose submodule is at the pin; only the
sources hash changes, every architecture entry already matched.

* ci: pin the IQ1_S prefill work, and a fork fix the gate needs to build

The pin moves to d43f82f34, which carries the IQ1_S producer arm (fork #427),
the op, matcher and test rows for it (fork PR stacked on #427) and one
ui-assets fix: the published UI dist bundles workbox into sw.js and no longer
ships workbox[hash].js, so ui_validate_assets stopped every configure this
gate does on a pin bump, and hw_gate could not reach a device phase at all
(44346581686, 44297044947, 44238065559: build FAIL 8s, six repeats).

registry/architectures.json is regenerated in this tree, so the recorded
llama.cpp source hash is the gitlink's full hash rather than a hand-typed
string that happened to share its first nine characters.

* ci: do not fetch the prebuilt Web UI in the hw gate

The gate configure died before any device phase on every pin bump (six
repeats of "CMake Error at third_party/llama.cpp/scripts/ui-assets.cmake:137
(message)", build FAIL in 8 s on 44346581686, 44297044947, 44238065559).
ui_validate_assets requires workbox[hash].js, and the prebuilt dist the fork
downloads - the moving "latest" tag of the ggml-org/llama-ui bucket, since the
versioned tags 404 - now ships the SvelteKit layout, which bundles workbox
into sw.js. A gate tree that reconfigured with the older dist in it kept
passing, so only branches that move a pin hit this.

No gate phase reads the UI: they drive kernel entry points or llama-server over
HTTP. LLAMA_USE_PREBUILT_UI=OFF and LLAMA_BUILD_UI=OFF make the asset step
embed an empty table ("UI: no assets available - building without an embedded
UI", "embedded 0 assets") and never touch the network, and .ui-flags wipes a
cache that was configured without them.

1bit-MONSTER/llama.cpp pin to 4df0f3e6c: the IQ1_S prefill arm with both packet
halves staged, the op that selects it, its matcher and its test rows.

* ci: retake the GPU token when gpu-hold refuses a fault window

gpu-hold exits 78 when any lane's kernel log carries a GPU fault in the last 10
minutes, and a refused take drops the queue position, so the gate failed three
times in a row on 2026-11-18 without running a phase: /home/bcloud/hrx-2861/repro
page-faulted at 14:11:19 and 14:21:46, each time 30-60 s before the ticket
reached the front, and the box reset the GPU both times.

Wait out the window (HW_GATE_FAULT_RETRY_WAIT, 660 s) and retake, at most twice,
then exit with the helper's status so a box that really is faulting still fails
the gate instead of hiding it.

* ci: drop the stale UI dist the gate tree still validates

LLAMA_USE_PREBUILT_UI=OFF stops a new download but ui-assets.cmake emit_files()
validates a dist directory that already has assets, and the gate tree still held
the 12:35 copy of the current "latest" Vite layout, so the configure died again
(44369282109, build FAIL 8 s, six "missing required asset(s)" messages). Remove
the generated dist and its stamp with the cache: with nothing to embed the step
reports "no assets available - building without an embedded UI" and "embedded 0
assets", verified on a tree carrying that same layout.

---------

Co-authored-by: bcloud <bcloud@localhost>
Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant