Skip to content

ci: pin hrx at the fork commit that builds test-hrx-host-resident (#2761) - #2860

Merged
bong-water-water-bong merged 5 commits into
mainfrom
ci/pin-hrx-8f43d62
Nov 18, 2026
Merged

bong-water-water-bong merged 5 commits into
mainfrom
ci/pin-hrx-8f43d62

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Bumps third_party/llama.cpp from c086759 to 8f43d62 and drops test-hrx-host-resident from the fork-ctest known-fail baseline.

Why

test-hrx-host-resident never compiled, so ctest listed it as Not Run and the baseline carried it as a known failure. The fork fix (#422 → 8f43d62) adds ../ggml/include ../ggml/src plus the HRX include dir to that one target, so the binary now builds and the row runs:

./bin/test-hrx-host-resident
test-hrx-host-resident: ok (residence != usage)

That leaves 7 reds in fork_ctest_known_fail instead of 8 (engine#2761), and the row is out of the baseline so the ratchet notices if it ever regresses.

The pin also carries fc18ee2 (corpus: share the IQ1_S codebook reader), which is the first step of the IQ1_S prefill work in #2832 — no behaviour change on its own, ninja ggml-hrx links and the corpus regenerates.

bong-water-water-bong and others added 4 commits November 17, 2026 14:47
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`).
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`).
Records the measured 8x gap between the packed formats and the i-quants at
prefill, the wmma peak measured on the same box (51.7 TFLOPS f16, 52.6 from
iu8), and a staged design: tile the weight once per batch (stage A), then move
the inner loop to int8 matrix cores (stage B). Explains why chunking the decode
kernel cannot close it: measured, bit-identical PPL, no throughput change.
)

8f43d62 fixes the include paths so test-hrx-host-resident compiles, which
means the row is no longer 'Not Run' in the fork ctest run. Drop it from the
known-fail baseline so the ratchet notices if it breaks again.
…r narrowing

registry_pins and registry_content fail on a pin bump until tools/registry_build.py
runs against the submodules at their pins; this is the regenerated output
(350 architectures, unchanged set).

The pin also carries fc18ee2, which moved the IQ1_S codebook reader into
motifs/kquant_iq1_s.loom with a new @ggml_iq1s_f16_pair (two fptruncs, one per
16-value packet). hrx_f16_narrowing_check flags it as a new narrowing body;
it is the same f32->f16 publish the q6_k pair motif does, and the prefill tile
feeds it activations already held in f32.
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

422 - Partially compliant

Compliant requirements:

  • The PR bumps third_party/llama.cpp to commit 8f43d62 which includes the fix for the missing header
  • The PR removes test-hrx-host-resident from the fork-ctest known-fail baseline, indicating it now builds

Non-compliant requirements:

  • The PR does not address the underlying issue of the test body needing the same treatment as the header

Requires further human verification:

  • The test body fix for the deleted header's symbol needs to be verified manually

2832 - Partially compliant

Compliant requirements:

  • The PR includes a commit that shares the IQ1_S codebook reader, which is the first step towards fixing the prefill issue

Non-compliant requirements:

  • The PR does not implement the actual prefill matcher for IQ1_S

Requires further human verification:

  • The actual prefill matcher implementation for IQ1_S needs to be verified

2761 - Partially compliant

Compliant requirements:

  • The PR pins the HRX fork at a commit that fixes the build issues
  • The PR adds test-hrx-host-resident to the ctest suite and removes it from the known-fail baseline
  • The PR configures the HRX build to include tests

Non-compliant requirements:

  • The PR does not address all the failing tests in the fork's ctest suite

Requires further human verification:

  • The remaining failing tests in the fork's ctest suite need to be investigated further
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Regex Pattern Issue

The regex pattern for parsing ctest failure lines was updated to handle labels after the parentheses. This change might affect how failure lines are parsed, especially for rows with labels. Ensure that the updated regex correctly handles all possible failure line formats.

FAILED_LINE = re.compile(r"^\s*\d+ - (\S+) \((Failed|SEGFAULT|Subprocess aborted|Timeout|[A-Z][^)]*)\)(?:[ \t]+.*)?$",
                         re.MULTILINE)
Failure Filtering Logic

The logic for filtering out skipped tests was updated to specifically exclude rows with skipped, disabled, and not in the reason. This change ensures that Not Run rows are not treated as failures, which is important for the ratchet to function correctly. Verify that this logic is correctly implemented and does not inadvertently filter out valid failures.

if reason.split()[0].lower() in ("skipped", "disabled"):
    continue          # a row that did not run is not a failure and must never enter the ratchet
# `Not Run` is NOT in that list, on purpose (engine#2836): ctest puts it in the FAILED block and COUNTS it
# in "M tests failed", so dropping it made count != len(names) and every log with an unbuilt binary read
# as truncated -- "cannot tell", rc 2, the failure this tool exists to prevent. The baseline carries
# `test-hrx-host-resident # Not Run` for exactly this reason: an unbuilt row is a failure to fix, not a skip.
out[name] = reason
Test Execution Configuration

The workflow now explicitly sets DONEBIT_HRX_BUILD_TESTS=ON to enable test building. Ensure that this configuration change does not introduce any unintended side effects or conflicts with other build settings.

-DONEBIT_HRX=ON -DONEBIT_HRX_BUILD_TESTS=ON

@github-actions

Copy link
Copy Markdown

Failed to review PR

@bong-water-water-bong
bong-water-water-bong merged commit 67d29c5 into main Nov 18, 2026
13 of 14 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the ci/pin-hrx-8f43d62 branch November 18, 2026 02:24
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