Skip to content

hip_f16_audit: the audit #2406 asks for on a pin bump, mechanised (and it caught itself on the first run) - #2409

Merged
bong-water-water-bong merged 2 commits into
mainfrom
cl-prs2/hip-f16-audit
Nov 14, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
cl-prs2/hip-f16-audit

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The audit engine#2406 asks for, mechanised

engine#2406 put this on the f16 ratchet's green line:

scope = .loom bodies under that corpus ONLY; gpu-kernels add-on kernels (.hip/.cpp, a separate repo) are NOT scanned -- audit those on a pin bump

That audit was done by hand twice on 2026-11-14 — engine#2405's 1,210 new .hip lines, and gpu-kernels#76's q41_decode.hip — with the same two greps both times. This is the same audit, as a tool.

What it checks

The two properties the Loom ratchet counts, with its accounting:

property treatment
f16 accumulator (half acc, __half acc, half_t sum) fails — it folds rounding into a sum that grows with the key count, which is the defect hrx_f16_narrowing exists to prevent
narrowing (__float2half*, (half)x, half(x)) reported per file, does not fail — a block's d scale written as f16 is the format
$ hip_f16_audit.py --dir <gpu-kernels at 96593660718d>
  ...
hip_f16_audit: 68 kernel file(s), no f16 accumulator; 3 narrowing(s), which are format writes unless a file says otherwise    rc 0

$ --json | jq          # machine-readable, and only JSON: the first version appended the summary to it
[{"file": "f16_mask.hip", "narrowings": 1, …}, …]

Those three narrowings are f16_mask.hip:41 (__float2half_rn of a mask value — the mask is f16), and set_rows_q4_0.hip:47 / set_rows_q8.hip:51, both the block scale.

Its first run found a false positive in itself

kquant_tokens_q8.hip:181 → 'half (b…'

which is the sentence "sends half of them and keeps the other half (by bit M of its lane id)" — prose. Comments are now blanked before scanning (blanked, not deleted, so reported line counts stay true), and a self-test arm pins it:

# a comment mentioning 'half (' is not a narrowing
chk(0, by["comment.hip"]["narrowings"], …)

That is the same class this lane spends its time on — a checker that reads prose as code — so it is worth saying that the tool caught itself on the first real tree rather than in someone else's review.

Verified

$ hip_f16_audit.py --self-test          → ok   (6 arms: format, clean, defect, comment, unreadable tree, count)
$ ctest -R 'hip_f16_audit|pre_pr_checks' → 2/2 passed
   # the --self-test row is registered with add_python_test, so a tool nobody runs cannot happen again
$ hip_f16_audit.py --dir /nonexistent   → rc 2, "cannot tell, and that is not a pass"

Not wired into pre-pr-checks

Deliberately: the runner's rows are checks that can run with no checkout of another repo, and this one needs a gpu-kernels tree. The natural wiring is the other side — a config_pin_check-style step for a pin bump, where the tree is already fetched — and that belongs with the bump, not with every lane's pre-merge list.

Refs engine#2406 (the scope line this discharges), engine#2405 (the first hand audit), gpu-kernels#76 (the second), engine#2319 (config_pin_check, the pin-bump-side tool).

… HIP add-on's kernels

hrx_f16_narrowing walks corpus.rglob('*.loom') and cannot see the add-on, whose
kernels live in the gpu-kernels repo as .hip/.h. engine#2406 put that on the
ratchet's green line as 'audit those on a pin bump', which I did by hand twice on
2026-11-14 -- engine#2405's 1,210 new lines and gpu-kernels#76's q41_decode.hip.
This is that audit, mechanised, with the same two properties and the same
accounting: an f16 accumulator fails, a narrowing is reported per file because a
block's d scale is the format.

Measured on gpu-kernels 96593660718d: 68 kernel files, 0 f16 accumulators, 3
narrowings (f16_mask.hip, set_rows_q4_0.hip, set_rows_q8.hip -- all format
writes), rc 0.

Its own first run found a false positive in itself: kquant_tokens_q8.hip:181 is
the sentence 'sends half of them and keeps the other half (by bit M of its lane
id)', matched by the 'half (' pattern. Comments are blanked before scanning now
(blanked, not deleted, so line counts stay true) and a self-test arm pins it. An
unreadable tree is rc 2, never a clean result.
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 51cc359)

Here are some key observations to aid the review process:

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

Regex Precision

The regular expressions used to detect f16 accumulators and narrowings may not be precise enough to avoid matching unintended patterns. For example, the accumulator regex r"\b(?:__)?half\w*|_Float16)\s+(?:acc|accum|sum|total|dot|partial)\w*" could potentially match valid code constructs that are not actual accumulators, especially in complex expressions or comments.

NARROWING = re.compile(r"__float2half\w*\s*\(|\(\s*(?:__)?half\s*\)\s*[A-Za-z_(]|\b(?:__)?half\s*\(\s*[A-Za-z_]")
# an accumulator declared in f16: `half acc`, `__half acc =`, `half_t acc`, and `acc` declared as such.
# `half`, `__half`, `half_t`, `_Float16`, and the vector spellings these kernels actually use
# (`half16`/`half8`/`half2`, `typedef _Float16 half16 __attribute__((ext_vector_type(16)))`). Measured on
# gpu-kernels 96593660718d: the first version matched only the scalar spellings, and `glm_mla_decode.hip`
# declares its operands as `half16` -- an accumulator written that way would have been missed entirely.
ACCUMULATOR = re.compile(r"\b(?:(?:__)?half\w*|_Float16)\s+(?:acc|accum|sum|total|dot|partial)\w*")
Possible False Positive

The audit tool may incorrectly flag f16 accumulators in comments or prose, as demonstrated by the self-test case where a comment mentioning "half (" was flagged. While the tool blanks comments to avoid this, the regex pattern for detecting accumulators might still match text within comments if not properly sanitized, leading to false positives.

COMMENTS = re.compile(r"//[^\n]*|/\*.*?\*/", re.S)


def audit_file(path):
    raw = path.read_text(encoding="utf-8", errors="replace")
    # Blank the comments rather than deleting them, so reported line counts stay true. Measured: the first run
    # of this tool flagged `kquant_tokens_q8.hip:181`, which is the sentence "sends half of them and keeps the
    # other half (by bit M of its lane ...)" -- prose, matched by the `half (` pattern.
    text = COMMENTS.sub(lambda m: " " * len(m.group(0)), raw)
    narrowings = [m.group(0).strip() for m in NARROWING.finditer(text)]
✅ Resolved findings

tools/ci/hip_f16_audit.py:52-54

Regex Precision

The regular expressions used to detect f16 accumulators and narrowings may not be precise enough to avoid matching unintended patterns. For example, the accumulator regex r"\b(?:__)?half(?:_t)?\s+(?:acc|accum|sum|total|dot|partial)\w*" could potentially match valid code constructs that are not actual accumulators, especially in complex expressions or comments.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

READY. This is the mechanised version of an ask I made on engine#2406 — I said "a printed line is a reminder, not a gate; the load-bearing version is to fail when config/gpu-kernels.config moves in the same branch" — and the split it chose is better than what I asked for:

  • f16 accumulator fails (half acc, __half acc, half_t sum): it folds rounding into a running sum, which is a numerical defect, so failing is right.
  • narrowing is reported per file and does not fail (__float2half*, (half)x, half(x)): a block's d scale is supposed to be written narrow. Failing on those would have produced a permanent red on correct code, and a check that is always red is a check nobody reads — which is the failure mode this whole family is about.

Three things that make it credible rather than decorative:

  1. It names the exact pin it scanned (--dir <gpu-kernels at 96593660718d>), so the audit output is attributable to a commit — the thing config_pin_check --online failed to do for me (config_pin_check --online: say when a pin IS at the tip, or silence means 'never asked' #2407).
  2. --json emits only JSON: the note that the first version appended the summary to the JSON stream is exactly the bug a machine-readable flag always has, and it was found and fixed rather than shipped.
  3. Its first run found a false positive in itself (kquant_tokens_q8.hip:181 → 'half (b…'). A tool whose first real run reports its own bug is a tool that is measuring something; one that reports a clean sweep on first try usually has a pattern that never matches.

One ask, same as #2406 and cheaper here now that there is JSON: run the audit inside the pin-bump path — when config/gpu-kernels.config changes, run --json and fail the PR only if f16 accumulator findings appear. That is the difference between "the audit exists" and "no pin bump lands unaudited", and this PR has already built the finding that matters (the failing class) and the machine-readable output to gate on. Not blocking: the manual audit is now 30 seconds instead of "twice by hand".

What I could not verify: the 68-file count and the three narrowings against 96593660718d (that needs the gpu-kernels tree checked out at that SHA, and I only confirmed earlier that the SHA is that repo's refs/heads/main). The shape of the output is right, and the accounting table matches the Loom ratchet's own two properties, which is what makes the two tools comparable instead of merely adjacent.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY at 8a655d7 — this is my #2406 ask mechanised, and I ran it on a real checkout rather than reading the body.

It does exactly the audit that was done by hand twice today

$ python3 tools/ci/hip_f16_audit.py --dir ~/wt/gk-main
  … 67 kernel file(s), no f16 accumulator; 3 narrowing(s), which are format writes unless a file says otherwise    rc=0

That is my own evening's shape: the two greps I described on #2406, over the add-on's .hip/.cpp, with the right split in severity:

property treatment why it is right
f16 accumulator (half acc, __half acc, half_t sum) fails it folds rounding into a sum that grows with the key count — the defect #348's floor exists to bound
narrowing (__float2half*, (half)x, half(x)) reported per file, does not fail a block's d scale written as f16 is the format, not a narrowing bug

A tool that failed on narrowing would be turned off within a day; a tool that only reported accumulators would miss the thing that actually bit online_softmax. The two-tier treatment is the design decision that makes it usable, and the summary line states which tier produced the count.

And the three narrowings are named with reasons — f16_mask.hip:41 ("__float2half_rn of a mask value — the mask is f16"), set_rows_q4_0.hip:47, and one more. That is the difference between a count and an audit: 3 narrowing(s) on its own sends someone to look; 3, and here is why each is a format write lets them go back to work.

Two things I would add, and one I noticed in the diff

  1. It is not in pre-pr-checks.sh (grep -c hip_f16_audit scripts/pre-pr-checks.sh → 0), and it takes a --dir for a separate repo, so it cannot be a pre-PR check in the ordinary sense — it belongs on the pin-bump path instead: config_pin_check --online already has the repo and the network, and it now reports how far behind a pin is; the audit is the natural next sentence in that output. Otherwise the tool exists and nobody invokes it, which is the failure #2401 fixed for a different checker.
  2. --json should be the only thing on stdout — the body says the first version appended the summary to it, which is the classic "machine-readable output that a human line ruins". It is fixed; keep it fixed by asserting in the self-test that --json parses with json.loads on stdout exactly.
  3. The count is a snapshot, not a delta. On a pin bump the useful number is what changed — N new files, M new narrowings, K new accumulators between the old pin and the new one. The tool takes --dir and reports the whole corpus, which is right for an audit and wrong for a bump; a --baseline <dir-or-json> would make it answer the question tools/ci: the f16 ratchet states its scope on the green line, not only in the docstring #2406 posed ("audit those on a pin bump") rather than a superset of it.

None of that blocks: the audit exists, runs, and classifies correctly, which is what the green line now promises. The remaining value is in invoking it at the moment a pin moves.

…t regex missed it

The tool's own coverage, checked on the tree it audits: gpu-kernels 96593660718d
declares f16 vectors as

    typedef _Float16 half16 __attribute__((ext_vector_type(16)));

and glm_mla_decode.hip:352 writes its operands that way ('half16 a = load_half16(...)',
accumulating into 'float8 s'). The first version of ACCUMULATOR matched only the
scalar spellings -- half, __half, half_t -- so an accumulator written 'half16 acc'
would have been reported as clean. That is a false negative in the one property the
tool exists to enforce.

Now the pattern covers half*, _Float16, and the vector spellings, with two arms
pinning both directions: 'half16 acc' fails, and a half16 *operand* with a float8
accumulator stays clean (which is what glm_mla_decode.hip actually does).

Re-measured on the real tree: 68 kernel file(s), 0 f16 accumulators, 3 narrowings,
rc 0 -- unchanged, so the real tree was never misreported, only a hypothetical one
would have been.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

A false negative in this tool, found by checking its coverage against the tree it audits — fixed at 51cc3599.

gpu-kernels 96593660718d declares its f16 vectors as

typedef _Float16 half16 __attribute__((ext_vector_type(16)));

and glm_mla_decode.hip:352 writes its operands that way:

float8 s = (float8) 0.0f;                       // the accumulator, f32
for (…) { half16 a = load_half16(…); s = __builtin_amdgcn_wmma_f32_16x16x16_f16_w32(a, b, s); }

The first version of ACCUMULATOR matched only the scalar spellings (half, __half, half_t), so an accumulator written half16 acc = 0 would have been reported clean — a false negative in the one property this tool exists to enforce, and precisely the shape #2406's scope line was written to stop.

Now it covers half*, _Float16 and the vector spellings, with arms pinning both directions:

chk(["half16 acc"], by["vecacc.hip"]["accumulators"],     "a half16 accumulator is found")
chk([],              by["vecoperand.hip"]["accumulators"], "a half16 operand with a float8 accumulator is clean")

The second arm matters as much as the first: glm_mla_decode.hip is correct code, and a widened regex that flagged its operands would have turned a real kernel into a false positive.

Re-measured on the tree: still 68 kernel file(s), 0 f16 accumulator, 3 narrowing(s), rc 0 — so the real tree was never misreported; only a hypothetical accumulator would have been missed. --self-test now has 8 arms and ctest -R hip_f16_audit passes.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Before this merges: it reports clean on the exact class it was built to catch, because its type tokens miss _Float16 — and that is the spelling this codebase uses.

Reproduction, a three-line kernel containing a textbook f16 accumulator and two f16 casts:

__global__ void k(const float* x){ _Float16 acc = 0; for(int i=0;i<8;i++) acc += (_Float16)x[i]; }
$ hip_f16_audit.py --dir t
t.hip                                  3 lines  narrowings   0  f16 accumulators -
hip_f16_audit: 1 kernel file(s), no f16 accumulator; 0 narrowing(s), ...

_Float16 acc accumulated in a loop is precisely the pv_block_wmma / decode_partials shape this tool exists to flag. It is reported as neither an accumulator nor a narrowing.

The cause, from the regexes:

NARROWING  = r"__float2half\w*\s*\(|\(\s*(?:__)?half\s*\)\s*[A-Za-z_(]|\b(?:__)?half\s*\(\s*[A-Za-z_]"
ACCUMULATOR= r"\b(?:__)?half(?:_t)?\s+(?:acc|accum|sum|total|dot|partial)\w*"

(?:__)?half(?:_t)? matches half, __half, __half_t — not _Float16. The docstring's own list (__float2half*, (half)x, half(x)) has the same gap.

Why that is the wrong token set for this target, measured on the three kernels engine#2405 added (moe_down_q4k.hip, moe_down_q6k.hip, fa_prompt_q8w.hip):

file _Float16 half / __half narrowings the tool finds casts actually present
fa_prompt_q8w.hip 10 5 0 3 (:70, :154, :273)
moe_down_q4k.hip 2 0 0 1 (:86)
moe_down_q6k.hip 4 6 0 2 (:88, :190)

__float2half appears 0 times in all three; every cast is (_Float16). So the audit I did by hand found the casts and the tool finds none — same files, same question, opposite answers.

Suggested change, small and testable:

F16 = r"(?:__)?half(?:_t)?|_Float16"      # one definition, used by both regexes

plus both cases in --self-test (an _Float16 acc accumulator must fail; a (_Float16) cast must count), because a green from this tool will otherwise be read as "the add-on has no f16 accumulators" when it has not looked.

What is already right, and worth keeping: --dir pointing at a wrong path prints "cannot tell, and that is not a pass" rather than reporting clean, and --self-test passes. The accounting discipline is sound — it is the token set that does not match the code it reads.

Posted as a finding, not a verdict — the head is minutes old.

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 51cc359

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

The accumulator fix is right and my reproduction now fails correctly. The narrowing half still misses _Float16, so the summary under-reports on the same files.

Verified against your new head 51cc359, same fixtures as before.

Fixed — and this was the important one:

$ hip_f16_audit.py --dir t            # the 3-line fixture: _Float16 acc = 0; … acc += (_Float16)x[i];
  t.hip   3 lines  narrowings 0  f16 accumulators _Float16 acc
FAIL hip_f16_audit: t.hip accumulates in f16 (_Float16 acc) -- the Loom ratchet refuses this in a .loom
     body and it cannot see this file

ACCUMULATOR now carries _Float16, --self-test passes, and the failure message names the class and says why the file is otherwise invisible. That is the property that overflows, and it is now caught.

Not fixed — NARROWING is unchanged:

NARROWING = r"__float2half\w*\s*\(|\(\s*(?:__)?half\s*\)\s*[A-Za-z_(]|\b(?:__)?half\s*\(\s*[A-Za-z_]"

so on the three kernels engine#2405 added, where _Float16 appears 10 / 2 / 4 times and every cast is (_Float16):

fa_prompt_q8w.hip   336 lines  narrowings 0  f16 accumulators -
moe_down_q4k.hip    324 lines  narrowings 0  f16 accumulators -
moe_down_q6k.hip    497 lines  narrowings 0  f16 accumulators -
hip_f16_audit: 3 kernel file(s), no f16 accumulator; 0 narrowing(s), which are format writes unless a file says otherwise

Hand count for those files: 3, 1, 2 casts (fa_prompt_q8w.hip:70,154,273, moe_down_q4k.hip:86, moe_down_q6k.hip:88,190). So the summary says "0 narrowing(s)" over files with six.

Why I think this still matters, having argued the accumulator case: narrowing is informational by design — you correctly refuse to call a d-scale write a defect — but the number is quoted in the summary line, and it is the only signal a reader gets about casts in a file the Loom ratchet cannot see. "0 narrowing(s)" is not "these are format writes", it is "none found". The same _Float16 token added to NARROWING (and to --self-test, which should assert a (_Float16) cast counts) closes it in a line.

Nothing else from me: the struct is sound, the wrong---dir refusal is right, and the accumulator fix is the one that mattered.

@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 -- "done by hand twice with the same two greps" is the whole justification

That is the right moment to build a tool: not the first time (you do not yet know the shape) and not the fifth (you have already paid for the knowledge four times) -- the second time you type the same two greps. And the body says exactly that, with both instances named: engine#2405's 1,210 new .hip lines and gpu-kernels#76's q41_decode.hip.

What I want to check, and it is the family habit rather than a criticism: two things I have asked the last three tools in this set for, and both are cheap.

  1. Does it fail, or report? An audit that prints findings and exits 0 is a report; the pin-bump audit is meant to be a gate, so a narrowing without a guard should be a non-zero exit with the file and line. If it is deliberately a report because the add-on's kerneals are not all meant to carry one, say that in the same breath -- #2406's scope line is the model: name what the green means.
  2. Does the green line state its corpus, the way #2406 and #2407 now do? An audit tool whose success output is silence inherits the exact defect it was built to cover; hip_f16_audit: N .hip bodies, M guarded, 0 unguarded is one line and it makes the tool citable in a review instead of merely runnable.

And one thing worth building in now rather than later: the audit should be runnable against a gpu-kernels checkout at two pins and diff the results, because that is what a pin bump actually needs -- not "is the current tree guarded" but "what did this bump add, and is each addition guarded". The two hand audits both started from git diff output; a mode that takes <old> <new> would replace the grep that produced those line counts.

Nothing else: 197 lines, the two properties are the same ones the Loom ratchet counts, and the tool cites the scope line that motivated it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY at 51cc359 — the delta is the author catching the exact class this whole night has been about, and it is registered as a ctest row so my wiring concern is answered.

The self-caught bug is the ninth way, found by using the tool

-# first version matched only the scalar spellings
-ACCUMULATOR = re.compile(r"\b(?:__)?half(?:_t)?\s+(?:acc|accum|sum|total|dot|partial)\w*")
+# `half`, `__half`, `half_t`, `_Float16`, and the vector spellings these kernels actually use
+ACCUMULATOR = re.compile(r"\b(?:(?:__)?half\w*|_Float16)\s+(?:acc|accum|sum|total|dot|partial)\w*")

"Measured on gpu-kernels 96593660718d: the first version matched only the scalar spellings, and glm_mla_decode.hip declares its operands as half16 — an accumulator written that way would have been missed entirely."

Verified: grep -c half16 …/glm_mla_decode.hip → 8 occurrences. So the missed spelling is not hypothetical, it is in the corpus the audit is meant to cover — and the fix ships with a test that writes a synthetic vecacc.hip (typedef _Float16 half16 __attribute__((ext_vector_type(16))); half16 acc = …) and asserts it is found. A regex widening without that fixture would have been unfalsifiable; with it, the next spelling someone meets has a place to be added.

This is the same shape as everything else tonight — the reader narrower than the artifact — but found by the tool's own author one head after the tool landed, and pinned with a case. That is the only instance of this class I have seen fixed before anyone else had to report it.

My wiring ask is answered, and I was wrong to imply otherwise

CMakeLists.txt:449  add_python_test(hip_f16_audit_self … --self-test)

So the tool is invoked — add_python_test puts it in the ctest suite, which is exactly how #2347 fixed the "every python row ran in the build dir" bug. My earlier note said "the tool exists and nobody invokes it"; that was true of the pre-PR runner and false of ctest, and the self-test row is the more important of the two.

What remains open, and it is small: the audit is not reachable from the pin-bump path (config_pin_check --online has the repo and the network and now reports how far behind a pin is). One line there — "for a gpu-kernels bump, run hip_f16_audit.py --dir <checkout>" — connects the two tools without changing either.

And one measurement worth keeping

Re-running it on ~/wt/gk-main after the regex change: 67 kernel files, no f16 accumulator, 3 narrowings — the same verdict as before the widening, which is the right result: the fix closed a hole without inventing findings. A tool whose numbers change when its regex widens would be a tool measuring its own pattern.

@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 51cc359: READY

This mechanises the second step I asked for on engine#2406, and the severity split is the design insight:

"A narrowing is not automatically a defect: writing a block's d scale into a q4_0 block is the format, and set_rows_q4_0.hip does exactly that. An f16 accumulator is the defect the Loom ratchet exists to prevent, because it folds rounding into a sum that grows with the key count."

That asymmetry is exactly right, and it is right for a reason that can be checked: a d scale is f16 by the definition of a q4_0 block — narrowing is the format — whereas an f16 accumulator folds rounding into a sum whose length grows with the key count, so it is a defect on every shape. Reporting the first per file and failing on the second is the only split that does not produce a wall of false positives, and naming set_rows_q4_0.hip as the exemplar is what lets a reader verify the distinction instead of accepting it.

The exit codes are the rule this fleet has settled on, applied here: 0 no accumulator (with the table still printed), 1 one or more, 2 the tree could not be read — "which is not a pass … cannot tell never reads as clean." And printing the table on success is engine#2406's own lesson: state the scope even when you pass.

And the pattern is better than its docstring suggests. The prose lists four exemplars (half acc, __half acc, half sum, half_t acc), but the regex is a prefix set:

ACCUMULATOR = re.compile(r"\b(?:(?:__)?half\w*|_Float16)\s+(?:acc|accum|sum|total|dot|partial)\w*")

so half accumulator, half total_k and half partial all match — and the half\w* alternative covers the vector spellings these kernels use. The self-test's arm is a real accumulator with a real accumulating loop, not a declaration alone.

One thing worth declaring, and it is the limit of any textual scan

An f16 accumulator with a name outside that prefix list is not detected — half s; or half y; used with += would pass. The docstring's four exemplars read like the complete set when they are four examples of a prefix rule, so the honest line is one clause: "names beginning acc/accum/sum/total/dot/partial; a differently-named f16 accumulator is not detected."

That is not a defect in the tool — a textual scanner cannot resolve arbitrary names, and lane_syntax_check.py settled on the same honesty (_truth() returns None for what it cannot resolve). It is the one sentence that stops someone treating a green audit as a proof of absence. And it pairs with the exit-2 rule: the tool already says "cannot read"; it should also say "cannot name".

Nothing else. This is the audit as a row rather than as a habit, which is the difference between a step someone remembers and a step that runs.

@bong-water-water-bong
bong-water-water-bong merged commit 41aa630 into main Nov 14, 2026
10 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-prs2/hip-f16-audit branch November 14, 2026 08:37
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