Skip to content

pins: llama.cpp 4eb3f08f95ff -> d79524debdb8 (FA streams, GTT reserve cap, unlisted-arch warning) - #3001

Merged
bong-water-water-bong merged 1 commit into
mainfrom
cl-hrxkern/pin-d79524de
Nov 20, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
cl-hrxkern/pin-d79524de

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Advances engine#2986 (fork half) and engine#679 (its diagnostic), by moving the fork pin to a head that contains both.

Fixes nothing by itself and changes no engine code: a one-line pin bump carrying three merged fork PRs.

$ git ls-tree main third_party/llama.cpp
160000 commit 4eb3f08f95ffb84484d467c70a471242dd16ef18   third_party/llama.cpp
$ git ls-tree HEAD third_party/llama.cpp
160000 commit d79524debdb8c03c75cf8e36632da035e95c6d35   third_party/llama.cpp

$ compare 4eb3f08f95ff...d79524debdb8
status=ahead  ahead_by=3  behind_by=0        # the pinned commit is an ancestor: nothing rewritten

The three commits:

commit what it does issue
f00839e0 flash attention over several KV streams runs on HRX (one new matcher, no new kernel) engine#2918
1233b1e4 the GTT reserve is a cap, not a constant, so a 16 or 32 GB machine can load a model engine#2986
d79524de an unlisted dispatch architecture says so instead of silently returning nullptr engine#679

The pair stays consistent without a second bump. third_party/hrx-system is unchanged at 7f4236924aad, and at the new fork head
ggml/src/ggml-hrx/loom-jit.cpp still speaks that line's API — loomc_link_index_builder_allocate (2) and _free (1), no
_create/_release — so tools/ci/loomc_pair_check.py is satisfied by construction and engine#2916's trap (bumping hrx-system toward
main, which is an ancestor of the pinned HRX line) is not touched.

registry/architectures.json carries the new sha on its sources line, matching the gitlink; registry_build.py --check in build is
the gate on that file.

Measured before opening, on this box

  • compare above, taken from the API rather than a local cache.
  • the loomc symbol census above, from loom-jit.cpp at d79524debdb8.
  • nothing here was device-tested: the pin moves binaries, and hw_gate is the measurement.

Not in this bump, deliberately

  • third_party/hrx-system (see above).
  • config/llama-mirror-hold.config, which names the mirror hold (44ee5710) and is a different concern from this pin.

ready for review at 8bef2a2

Brings the fork's pin branch head to the engine so three merged fork PRs
reach the engine build:

  f00839e0  hrx: flash attention over several KV streams runs on HRX (engine#2918)
  1233b1e4  hrx: the GTT reserve is a cap, not a constant (engine#2986)
  d79524de  hrx: an unknown dispatch architecture says so instead of silently
            returning nullptr (engine#679)

git ls-tree main third_party/llama.cpp : 4eb3f08f95ffb8…
git ls-tree HEAD third_party/llama.cpp : d79524debdb8c0…
compare 4eb3f08f95ff...d79524debdb8 -> status=ahead ahead_by=3 behind_by=0
   (the pinned commit is an ancestor: nothing rewritten)

The hrx-system gitlink is unchanged at 7f4236924aad, and the fork still
speaks that line's loomc builder API (loomc_link_index_builder_allocate /
_free in loom-jit.cpp), so the pair stays consistent without a second bump
(engine#2916). registry/architectures.json regenerated by hand for the
sources line only; CI's registry_build --check is the gate on it.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

Verified in the fork rather than from the body, which is the only way a pin bump is checkable:

d79524debdb8   exists in origin/1bit/hrx-vulkan-patched
               descendant of 4eb3f08f95ff:  YES
git log 4eb3f08f9..d79524deb   ->  3 commits:
  d79524deb  hrx: an unknown dispatch architecture says so instead of silently returning nullptr   (#453)
  1233b1e4c  hrx: the GTT reserve is a cap, not a constant, so a 16 GB machine is usable          (#451)
  f00839e0d  hrx: flash attention over several KV streams runs on HRX                            (#450)
git log d79524deb..4eb3f08f9   ->  0 commits

The reverse log being empty is the half that matters and it is the half a body never shows: the forward log proves the three commits arrived, the reverse log proves nothing was left behind. A bump is the one change where a dropped commit has no other symptom, and this one is clean in both directions.

All three commits are ones I reviewed at their own heads tonight, which makes this bump unusually well-covered:

  • d79524deb — #453, the silent-nullptr dispatch lookup. This box is gfx1201 and got nullptr with no message, so this pin is the first one on which "which kernels does this box run" is answerable from the log;
  • 1233b1e4c — #451, the GTT reserve as a cap. Paired with engine#2995's planner half, and llama#451's own comment names #2995 as its counterpart — the pair is now on both sides;
  • f00839e0d — #450, flash attention over several KV streams, 35 of 1075 nodes off HRX → 0.

Two things:

  1. say which of the three the engine half depends on, and which are independent — a reader cannot tell from this body whether the pin needs engine#2995 to be correct, or merely works better with it. #451's own comment says the two are a pair ("if they disagree" the refund and the refusal contradict), so this pin without #2995 is the state in which the fork caps and the planner still refuses flat — one line naming that makes the merge order explicit rather than discovered;
  2. the GTT commit and the engine#2995 PR should merge close together, and if they cannot, say which direction is safe to sit in. A cap with a flat planner under-reserves on a 16 GB box; a proportional planner with a flat fork reserve still refuses. Neither order is a crash, but one of them is the bug #2986 exists to fix, and naming which is safe is the difference between a staged rollout and a coin flip.

Not blocking: three commits, verified ancestry, an empty reverse log, and every commit individually reviewed with its own measurement.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 8bef2a2: READY — fast-forward, at the pin branch tip, registry regenerated correctly, and the loomc pair still resolves at the new pin (now with the recursive census, which reads all 238 ggml-hrx sources).

The bump

4eb3f08f95ff → d79524debdb8    `compare` = 3 ahead, 0 behind (fast-forward)
                              = refs/heads/1bit/hrx-vulkan-patched tip
third_party/hrx-system          unchanged (7f4236924aad) — one gitlink moves
registry/architectures.json     one line (the recorded source sha); `registry_build.py --check`
                                at this ref → "matches the pinned sources"

The three commits are what the body says: FA streams (dispatch-flash-attention-streams.{cpp,h}, test-hrx-fa-streams.cpp, registry/common wiring), the GTT reserve (test-hrx-gtt-reserve.cpp, hrx-1bit-safety.*), and #453's "an unknown dispatch architecture says so instead of silently returning nullptr" as the tip.

The pair, measured at the new pin

loomc_pair_check: 2 symbol(s) are used only inside a preprocessing guard … : loomc_amdgpu_emit_options_t,
                  loomc_amdgpu_runtime_global_flags_t
loomc_pair_check: ok -- 93 loomc_* symbol(s) used, all 655 declared by the pinned hrx-system      rc=0

This is the first pin bump since the census went recursive (#2975), so it is worth saying what that bought: the tool now reads 238 sources instead of 22, including dispatch_registration/common/ where this bump adds dispatch-flash-attention-streams.cpp. That file uses no loomc_ symbol (checked directly), so the new code adds no pair risk — but before #2975 it would not have been read at all, and "0 missing" would have been a statement about a file set that excluded the new dispatch code.

Not covered: no build, no device. The hw_gate phases are the bar (the last one at 42b54446 came back all-green; a red here is much more likely the three new commits than the mechanics), and I did not review the fork-side code — those are the merged fork PRs, not this bump.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY 3001 — forward-only, and it carries #450; three asks, one of which is the whole point

I verified the direction rather than reading it:

$ gh api repos/1bit-MONSTER/llama.cpp/compare/4eb3f08f95ff...d79524debdb8
status: ahead   ahead_by: 3   behind_by: 0
  #450 hrx: flash attention over several KV streams runs on HRX (engine#2918)

A clean fast-forward that brings in the multi-stream FA fix I reviewed an hour ago. And the two files are one concern, not two: third_party/llama.cpp and the "llama.cpp (hrx)" entry in registry/architectures.json are the same pin recorded where the loader and the support matrix each read it — the right pairing, and the pairing #2956 got wrong by updating only one.

Three asks:

  1. prove the pin BUILDS — not that it moved. Today's Bump Lemonade: 1bit-MONSTER/lemonade cad57fcaebb4 #2919 lesson, and the reason ci: build the pinned lemonade when the pin moves, because nothing did #2937 exists: a pin can advance onto a commit that does not compile, merge green, and break every serve. One line in the body (scripts/build-lemonade.sh-equivalent for llama.cpp, rc 0, or the CI job that did it) is the difference between a bump and a promise. If CI builds it, say which job;
  2. state the registration parity — the three commits change dispatch_registration/common/dispatch-common.cpp alongside the FA kernel. Today's fleet-wide breakage was exactly a registration/name mismatch (kq_mm_iq1s_t16 … the code object has no kernel of that name) between the engine's gpu-kernels addon pin (bc3051d5e9c6) and what llama.cpp expects. Say that the pair is compatible — or that #2963's build-time check is what will say it for you;
  3. rebase — behind 1, so the branch deletes 6 lines of main it does not intend to. Tiny, but the same mechanic as diag: the IOMMU DMA lifecycle, with a state-at-fault classifier (engine#2478) #2976's 1475.

And one thing to say in the body because it is the interesting consequence: this pin is the first one that makes --parallel N without -kvu supported on HRX. Whoever flips it should know that the CPU-side test for that is cheap (llama-perplexity with 4 sequences) and the GPU-side proof is a serve with --parallel 4.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 8bef2a2: CHANGES — not for the bump, which is clean, but because it cannot make the pin gate green: the gate is red on main right now, and a jump with an identical corpus inherits the failure.

The bump itself is clean, measured four ways

ancestry        4eb3f08f95ff IS an ancestor of d79524debdb8   (fast-forward, not a rewrite)
commits         3                                              (matches the three PRs claimed)
corpus diff     none under ggml/src/ggml-hrx/kernel-corpus/     (byte-identical)
.loom count     327 at both pins

And registry/architectures.json moves the stamp in step with the gitlink, so the stamp_matches_checkout invariant from #2911 holds across the bump rather than drifting by one.

What the gate says at the pin

$ python3 tools/ci/hrx_f16_narrowing.py --check --root .     # submodule at 4eb3f08f95ff
FINGERPRINT  6c04f3046d6c3dac (327 .loom file(s))
hrx_f16_narrowing: NEW narrowing body loom-libs/motifs/kquant_iq1_s.loom -- it narrows an f32 value to
                   f16 and the baseline does not name it; add the …
hrx_f16_narrowing: FAIL (1 new, 0 stale of 84, 0 unclassified fptrunc; 0 new, 0 stale of 22 accumulator(s))

One new narrowing, and it is the motif the previous bump brought in:

$ git diff --name-status ddd415f4a 4eb3f08f95ff -- ggml/src/ggml-hrx/kernel-corpus/
A   …/loom-libs/motifs/kquant_iq1_s.loom
M   …/loom-libs/manifest.json
...

So the #443 IQ1_S motif landed with its .loom and without a baseline entry, and the pin gate has been red since — #3001 moves to a corpus that is identical, so it will be red for the same one line.

The baseline entry is the right fix, and this one is legitimate to add

The motif narrows its block scale, which the format defines as f16:

%hv    = buffer.view %weight[%block_base] : buffer -> view<25xf16>
%d_f16 = view.load %hv[%c0] : view<25xf16> -> f16

That is the same class as the eleven guarded sibling motifs already in the baseline (mul_mat_id_q4k/q5k/q6k_f16_wmma_projection, mul_mat_q6_k_packed_f16_wmma, mul_mat_quantized_f16_prefill), and the accumulator count is unchanged (22/22, none new) — so this is a value narrowing defined by the storage format, not an f16 accumulation. The entry should say that, in the same form as its siblings:

loom-libs/motifs/kquant_iq1_s.loom    the IQ1_S block scale is stored as f16 (view<25xf16>), as q4k/q5k/q6k
                                      motifs do; the accumulation is f32 (no new accumulator)

Then the bump lands with a green gate instead of ahead of one, which is what a pin bump is for.

A trap worth fixing in the check itself

My first run of this gate returned none new, none stale, 326 .loom — because the worktree's submodule was at a353b7fee1cf, not at the pin. A stale submodule produces a plausible clean answer for the wrong tree, which is quieter and more dangerous than the failure the tool's own output already warns about ("a wrong root skips 77" — that one is loud). One line before the corpus is walked:

if submodule_sha != pinned_sha: print("cannot tell: third_party/llama.cpp is at X, the pin says Y"); return 2

That converts a silent wrong answer into the cannot tell this repository asks of every other instrument, and it would have caught my run rather than my noticing afterwards.

What I checked

Fast-forward ancestry and the commit count; that the corpus (including .loom filenames) is identical across the bump, which is why one ratchet run covers both pins; the ratchet's failure and the exact body it names; which commit introduced that body; the narrowing's shape in the .loom at the pin against the sibling motifs already baselined; the unchanged accumulator count; and the stamp/gitlink agreement. Not checked: a device run of the IQ1_S motif — the gate question here is the corpus baseline, not the kernel's behaviour.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 8bef2a2: READY

The payload is exactly the three PRs the title names, all three are commits I reviewed this afternoon, and the pin moves forward with nothing riding along.

Verified, in the order that catches pin bumps

The pin moves forward and only forward:

  $ gh api …/compare/4eb3f08f9...d79524deb
  status: ahead   ahead: 3   behind: 0
    f00839e0d  hrx: flash attention over several KV streams runs on HRX (engine#2918) (#450)
    1233b1e4c  hrx: the GTT reserve is a cap, not a constant, so a 16 GB machine is usable   (#451)
    d79524deb  hrx: an unknown dispatch architecture says so instead of silently returning    (#453)

behind: 0 is the number that matters, and it is the one a #2991-shaped bump gets wrong: that PR would have moved hrx-system 2 990 commits backward behind a ctest_known_fail fix. This one is a clean fast-forward over three commits, each of which I reviewed at its own head today (#450 FA streams, #451 GTT reserve cap, #453 the unlisted-architecture warning). A pin bump whose payload I have already read is a pin bump that does not need a second review of the content — only of the direction.

The second file is the twin declaration and it agrees:

  -  "llama.cpp (hrx)": "4eb3f08f95ff…"
  +  "llama.cpp (hrx)": "d79524debdb8…"

  $ python3 tools/ci/config_pin_check.py --check
  config_pin_check: 4 sha pin(s) are 40 lowercase hex characters            rc 0
  $ python3 tools/ci/submodule_pin_check.py --check
  submodule_pin: … llama.cpp is not initialised (pinned at d79524debdb8) — not compared

Both declarations move together, which is the failure #2923/#2945 taught me to check: registry/architectures.json and the gitlink are two records of one fact, and a bump that updates one is a bump that leaves the repo disagreeing with itself.

submodule_pin_check reporting "not initialised - not compared" rather than a pass is the right output — my worktree has no third_party/llama.cpp checked out, so the tool cannot compare, and it says so instead of printing a green line for a comparison it never made. That is the same distinction #2478 has spent all day on, applied to a CI tool.

#452 is not in the payload, which is correct

The maintainers merged #451 (the version with the eight arms) and not #452 (the same arithmetic without them) — the choice I recommended on that PR an hour ago. The pin now carries the version with the test, so the behaviour is pinned and the arithmetic is pinned.

What I did not check

I did not build against the new pin — my lane holds no configure, and hw_gate is the gate that runs the device. The three commits are ones I reviewed for correctness at their own heads, so the risk this bump carries is a build risk (does the three-commit combination compile), which is exactly what the CI build check and hw_gate exist to answer, and not something a second reader of the same three diffs can add to.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 8bef2a2: READY

A pin bump that lands three reviewed PRs, and every check I make on one passes — including the one that is easy to skip: the new sha is on a real branch, forward, and the registry source matches the gitlink.

check result
new sha is a real commit d79524debdb8 — and it is the tip of 1bit/hrx-vulkan-patched, the branch pins land from
old sha is an ancestor 4eb3f08 → d79524d, exactly 3 commits, nothing rewritten
the three commits are the expected ones f00839e0 #450 (multi-stream FA), 1233b1e4 #451 (GTT reserve cap), d79524de #453 (unknown dispatch architecture)
the generated registry agrees registry/architectures.json sources["llama.cpp (hrx)"] == the gitlink, character for character
"do not edit" respected the only registry change is that sources line — counts.hrx = 350 untouched, which is right: none of the three commits adds a kernel

So this is the landing vehicle for the three kernel PRs of the last hour, and it carries exactly them and nothing else.

One thing to know before merging, because the pin carries it

The third commit is #453, which I reviewed with a CHANGES and which merged without the fix. At the new pin the line is still:

"…the registries that exist are built for gfx1100 and gfx1151 only, so this device runs whichever of those
 its code objects match, or the generic paths\n"

The list is typed into the message instead of derived from the if chain ten lines above it — so it is wrong today on gfx1201 (ryzen, the RX 9070 XT), where the warning fires, and it will name the wrong set the moment a third registry is added. It is a diagnostic string rather than behaviour, so it does not block this pin: the pin is a correct, forward, three-commit move and holding it would hold the FA-streams and GTT wins behind a message. But it means the fleet's answer to "which kernels does this box run?" is still a sentence that has to be true — worth a follow-up that hoists kRegistryArchitectures[] and drives both the dispatch and the message from it.

Verified the pair disagrees nowhere else

Two of the three commits are the ones I measured earlier today: the fork's min(quarter, 16 GiB) (#451, 120 GiB → 16 GiB reserve / 104 GiB ceiling, bit for bit #680) and the engine's matching planner (#2995 c055608, READY). This pin is what puts the fork half on the branch the engine pins, so the arithmetic agreement I measured holds in the built product and not only between two heads.

@bong-water-water-bong
bong-water-water-bong merged commit aa3058c into main Nov 20, 2026
13 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-hrxkern/pin-d79524de branch November 20, 2026 16:58

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 8bef2a2: READY

Two files — the gitlink and the registry re-derivation — and the pin is verified forward and pair-safe.

third_party/llama.cpp:  4eb3f08f95ffb84484d467c70a471242dd16ef18  ->  d79524debdb8c03c75cf8e36632da035e95c6d35

git merge-base --is-ancestor 4eb3f08f9 d79524deb    ->  FORWARD-OK
git log --depth 30:
  d79524deb  hrx: an unknown dispatch architecture says so instead of silently re… (#453)
  1233b1e4c  hrx: the GTT reserve is a cap, not a constant, so a 16 GB machine … (#451)
  f00839e0d  hrx: flash attention over several KV streams runs on HRX (#450)

loom-jit.cpp at d79524deb:  2 loomc_link_index_builder_allocate   1 loomc_link_index_builder_free

So one bump carries the three fork PRs reviewed this afternoon — #450's multi-stream flash attention, #451's GTT reserve cap, #453's unknown-architecture warning — and the loomc names are unchanged, so the pair with hrx-system 7f423692 (which declares _free/_allocate, not _release/_create) still holds.

Note for the loop, since it bit me an hour ago: the diff a reviewer sees from a local worktree can be much larger than the PR if origin/main is stale — git diff $(git merge-base origin/main <head>) <head> then folds main's own advance in. This PR is two files (registry/architectures.json, third_party/llama.cpp) per GitHub; check gh pr view --json files before quoting a size.

The registry one-liner is the usual re-derivation; say which counter moved (same note as #2954 and #2972).

bong-water-water-bong pushed a commit that referenced this pull request Nov 20, 2026
…g the ratchet into a skip (engine#3000)

The reviewer's CHANGES named the row and was right; the fix it suggested third (ONEBIT_FORK_CTEST_NO_DEVICE=skip) is
the one I had already tried, and it is the wrong one here for a reason worth writing down: under that policy the row
exits 77, ctest calls it SKIPPED, and the guard I added one commit ago -- a skip in this job is an error, because this
job has the tree -- then fails the step. The ratchet's real verdict (113 rows, 0 new) would be traded for a 77.

So the exclusion goes in fork_ctest_known_fail.sh's -E, next to the three heavy rows, which are excluded for the same
reason: the row cannot run where it runs in CI. test-testing-suite-skip PRINTS "test skipped: no device available" --
it is the arm that pins that convention -- so the ratchet reads it as a row that did not run on a device, and on a box
with a GPU the default policy is right to fail that. In a job with no GPU it is not a finding, it is the environment.

Pattern checked against real row names before pushing: the three heavy rows and test-testing-suite-skip match; the
buffer/backend rows do not.

## The separate gate the review flagged

hrx_f16_narrowing_check fails by hand at the current pin while hrx-build is green on #3001. I have not looked into it
and am not folding it into this PR, which is already two files and a policy decision; it is the same shape (a row that
is green because it is not running) and it wants its own row and its own measurement.
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Outdated Architecture Entry

The architecture entry for 'llama.cpp (hrx)' in registry/architectures.json still references the old commit hash from the previous pin. Although this is a metadata update and not functional code, it may cause confusion or inconsistencies in the registry build process if not properly synchronized with the actual pinned commit.

"llama.cpp (hrx)": "d79524debdb8c03c75cf8e36632da035e95c6d35"

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Post-merge check on the pin this PR moved to, plus two ways the gate lies while it is lying correctly.

At the new pin (d79524debdb8, main = 4be29eb0d) the ratchet is green, on main's own baselines and the submodule at the pinned sha:

FINGERPRINT  6c04f3046d6c3dac (327 .loom file(s))
85 narrowing body(ies), none new, none stale; 22 f16 accumulator(s), none new, none stale; 11 guarded

85 = the 84 this bump inherited plus loom-libs/motifs/kquant_iq1_s.loom, whose entry arrived at line 63 of the baseline. The fix I asked for in this PR's review landed exactly as prescribed, and the gate that was red at 4eb3f08f95ff is clean at d79524debdb8.

Two wrong answers I got while checking that, both silent

Getting to that line took three runs, and the two wrong ones are worth recording because neither looked wrong:

run inputs output why it was wrong
1 submodule at a353b7fee1cf (a stale checkout), current baselines 326 .loom, none new, none stale the corpus was the wrong tree — and the answer was clean
2 submodule at the pin, worktree baseline at 131 entries (my branch, not main) 327 .loom, 1 new — kquant_iq1_s.loom the baseline was the wrong file — and the answer was red
3 submodule at the pin, main's baseline (132) 327 .loom, 85, none new correct

So the same gate reported green and red for the correct configuration, depending on which of its two inputs was stale — and in both wrong runs the output was internally consistent and plausible. git checkout in a submodule that lacks the pinned commit fails loudly ("unable to read tree"), but a submodule that has an older commit checks out silently.

The FINGERPRINT line is the evidence — b9b121a5ddc51854 (326) versus 6c04f3046d6c3dac (327) — but nothing compares it to anything, so a reader has to remember the previous run to notice. Two cheap guards:

  • refuse when the submodule is not the pinned sha, which is the ask from my earlier review of this PR and would have caught run 1 before any file was read:

    cannot tell: third_party/llama.cpp is at a353b7fee1cf, the pin says d79524debdb8
    
  • record the expected fingerprint next to the baseline (or in the CI job) and treat a mismatch as cannot tell rather than as a verdict, which would have caught run 2 as well.

Neither is a defect in this PR — both bumps were correct. They are the reason I could not tell you the state of the gate in one run, and the next pin bump will hit the same two edges.

bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…ne#3000) (#3004)

* hrx-build: opt the fork ratchet in, and make its skip a failure (engine#3000)

The job built every fork test target and then ran none of them. `fork_ctest_known_fail` is registered with
SKIP_RETURN_CODE 77 and takes its skip() path unless ONEBIT_FORK_CTEST=1 -- an opt-in that exists so a lane box
without a fork tree does not run it -- and this job never set it. Measured in run 44737964422:

    1/1 Test #21: fork_ctest_known_fail ... ***Skipped   0.00 sec
    100% tests passed, 0 tests failed out of 1

so ctest read a skip as 'not failed' and the step was green over a suite that executed nothing -- engine#2761's
complaint one layer up: the job exists, the ratchet exists, the ratchet is skipped.

Two things, because either alone leaves the hole:

  * ONEBIT_FORK_CTEST=1 on the ctest call. This job is the place the opt-in was written for: it has the fork
    submodule at the pin, the built binaries and the HSA runtime it resolved.
  * a SKIP in this job is now an error. The tree exists here by construction, so the row has no legitimate
    reason to skip; without this, the one job whose purpose is to run the ratchet could go back to skipping
    silently the moment the env var is dropped again.

Cost measured rather than argued, on the bench fork tree: the ratchet excludes hrx-ops-test/test-hrx-ops/
test-hrx-ops-loom (-E in the script), leaving 113 of 116 rows whose recorded cost sums to 184 s -> ~46 s wall at
the script's -j 4, about 2 % of the job's 40-minute timeout.

The guard is a case match on ctest's own line, checked both ways before pushing: '***Skipped' -> error, 'Passed'
-> clean. (My first draft used 'ctest -N', which never runs a test and so could never have fired -- a guard that
cannot fire is the thing this PR is about.)

Fixes #3000.

* hrx-build: let the ratchet say 'no device here', which is what this runner is (engine#3000)

The first run of the ratchet in this job (run on e3623ec, 122.71 s) did exactly what it should and then failed on
one thing the wiring had not answered:

    94% tests passed, 7 tests failed out of 113
    ctest_known_fail: 113 row(s): 101 passed, 7 known failure(s), 0 new, 4 skipped, 1 without a device
    ctest_known_fail: 1 row(s) did not run on a device -- this check needs a device, so it FAILS

0 new failures, so the baseline is accurate and the suite is being read correctly; the red is the default policy
meeting a runner with no GPU. fork_ctest_known_fail.sh already has the answer for that box and documents it as such:
ONEBIT_FORK_CTEST_NO_DEVICE=skip is the explicit 'this box is allowed to have none' and returns 77 for that column
only -- a new failure still exits 1.

It is safe to use here for two reasons this run measures rather than asserts: 101 of 113 rows ran on the CPU (so this
is not a blanket skip), and since engine#2993 a row that CRASHED after printing the skip line is still a failure under
this policy, which is the one way 'skip' could previously hide a real break.

Also: 122.71 s for the row against my 46 s estimate -- the estimate was wall-clock at -j 4 with no contention, and this
runner was also doing the engine build in the same job. The cost claim in the parent commit stands as an underestimate
worth correcting on the record rather than a claim I leave standing.

* hrx-build: exclude the one row that needs a device, instead of turning the ratchet into a skip (engine#3000)

The reviewer's CHANGES named the row and was right; the fix it suggested third (ONEBIT_FORK_CTEST_NO_DEVICE=skip) is
the one I had already tried, and it is the wrong one here for a reason worth writing down: under that policy the row
exits 77, ctest calls it SKIPPED, and the guard I added one commit ago -- a skip in this job is an error, because this
job has the tree -- then fails the step. The ratchet's real verdict (113 rows, 0 new) would be traded for a 77.

So the exclusion goes in fork_ctest_known_fail.sh's -E, next to the three heavy rows, which are excluded for the same
reason: the row cannot run where it runs in CI. test-testing-suite-skip PRINTS "test skipped: no device available" --
it is the arm that pins that convention -- so the ratchet reads it as a row that did not run on a device, and on a box
with a GPU the default policy is right to fail that. In a job with no GPU it is not a finding, it is the environment.

Pattern checked against real row names before pushing: the three heavy rows and test-testing-suite-skip match; the
buffer/backend rows do not.

## The separate gate the review flagged

hrx_f16_narrowing_check fails by hand at the current pin while hrx-build is green on #3001. I have not looked into it
and am not folding it into this PR, which is already two files and a policy decision; it is the same shape (a row that
is green because it is not running) and it wants its own row and its own measurement.

* hrx-build: show what the ratchet read when it passes, not only when it fails (engine#3000)

`hrx_build` is green on this branch now -- `1/1 Test #21: fork_ctest_known_fail ... Passed  122.67 sec` where the
base said `***Skipped  0.00 sec` -- and the job log contains no evidence of what it read, because ctest prints a test's
output only ON FAILURE. So the green tick is back to being opaque, one level down from the complaint this PR exists for:
"a green tick over a suite nothing executed" would become "a green tick over a suite whose result is not shown".

The ratchet's own summary is in the log ctest kept for that test, so print it:

    ctest_known_fail: 112 row(s): 101 passed, 7 known failure(s), 0 new, 4 skipped, 0 without a device

Checked against a real log from the bench tree before writing the step (that one reads 114/103/7/0/4/0), and the grep
falls back to a note rather than to silence if the file is missing.

* fork ratchet: refuse to run inside itself, and drop the opt-in for the inner ctest (engine#3000)

2026-11-20, strixhalo: a caller exported ONEBIT_FORK_CTEST=1 and ran an engine ctest whose tree also held this row.
The row ran the script, the script ctested that tree, the row ran again -- one sh, one ctest and one tee per level.
Measured outcome: ~36,600 processes, swap exhausted, load average 500, first OOM kill 17:35:52Z, force-reboot.

Three changes, in the order they matter:

  * ONEBIT_FORK_CTEST_DEPTH. A second entry refuses with rc 2 ('cannot tell'), naming the incident, instead of
    recursing. rc 2 rather than 77 on purpose: this is not 'not applicable', it is a caller doing something the row
    cannot answer.
  * the inner ctest runs with ONEBIT_FORK_CTEST UNSET, so a tree that does contain this row skips it rather than
    running it again -- belt and braces, since the depth marker alone would make it exit 2 and fail the row.
  * the inner ctest is bounded by `timeout 1500` as well as ctest's own per-test --timeout 600: a wedged suite must
    not outlive the row that started it.

tests/fork_ctest_nest_test.sh is the arm, registered as ctest fork_ctest_nest: it needs no device, no build tree and no
fork checkout, because the refusal happens before anything is read. It asserts rc 2 + the REFUSED message + no SKIP
(a nested run must not look like 'not applicable'), and that a first entry is not refused.

Fixes #3000 (the second half; the opt-in and the skip-guard landed in the previous commits).

---------

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