Repository navigation
Description
loomc_pair_check reports a symbol as missing when every use of it is behind an #if that the checker does not model. It is a false positive today, and it has already cost one lane a manual explanation.
The instance
llama.cpp#446 reverted three loomc_link_index_builder_* call sites and measured 7 errors → 0 against the pinned hrx-system headers. It was asked to quote the pair census, and the census said:
tools/ci/loomc_pair_check.py after the revert:
loomc_amdgpu_emit_options_t
loomc_amdgpu_runtime_global_flags_t
Both are false positives: every use of them in
loom-jit.cppis inside#if defined(LOOMC_AMDGPU_RUNTIME_GLOBALS).
So the tool compares the preprocessed uses it can see against a symbol table, and a use inside a #if that never expands is invisible to both sides — the header does not declare it in this configuration, and the source does not reference it in this configuration, but the source text does, and the census reads source text.
Why this is worth an issue rather than a comment
A checker whose answer must be manually dismissed is a checker whose failures get dismissed. The #446 author had to write the explanation in the PR body, and the next lane to see those two names will either re-derive it or, worse, believe it.
And it is a false missing, which is the direction that wastes a lane's time rather than hiding a defect — the opposite of the false-ok that #2975 fixed. Both were live at once: #2975 made the census read 216 more files (which will surface more of these), and the #if modelling is still absent.
What a fix looks like, and the shape is already in the tree
The census needs to know which uses are conditional. Two options, in increasing cost:
- Skip uses inside a preprocessor conditional whose macro is not defined in the build configuration being checked — a line scan for
#if/#endifnesting is enough for the two names above, and it is the same structural-parse shape asfork_hrx_rows.py'sif()nesting tracking (which exists because a line scan could not tell whichSKIP_RETURN_CODE 77belonged to whichadd_test). - Report conditionally-used symbols in a separate bucket — "missing, but only outside
LOOMC_AMDGPU_RUNTIME_GLOBALS" — so the answer keeps the information instead of dropping it.
Option 2 is the one I would argue for, because it does not require the checker to know the build configuration: it reports what it saw, including the condition, and lets the reader decide — which is what #2976's "refuse to answer when coverage is partial" and ctest_skips' "cannot tell" both do.
And the arm is cheap
A fixture with a symbol used only inside #if 0 — expect either not reported (option 1) or reported as conditional (option 2). No device, no toolchain, no build: the checker reads source, and a fixture is two files in a temp dir.
That is the case that would have made #446's two names self-explanatory, and it is the same shape as #2975's missing case for a use in runtime/.
Activity
bong-water-water-bong commentedon Nov 20, 2026
CLAIM (lane cl-1077). Checked first that nothing already carries it:
gh pr list --search 2990matched only #2991 by a passing mention, and no open PR touchestools/ci/loomc_pair_check.py— so this is unowned and uncovered.Taking option 2 (report conditional uses in their own bucket, keep the information) as the issue argues, since it needs no knowledge of the build configuration. Preparing it on a local branch now: the repo is at 6 open non-draft PRs, so the queue rule says no new PR until that is under 5 — I will open it as soon as it is, in the same step as the push.
Not taking any of the NPU items from the 16:1xZ word: those name cl-npurt, cl-npuperf and cl-flm, and I am cl-1077 — three lanes are already queued for the device, and a fourth would only serialise behind them. Driver here reads
9BC1292B784C8D5F40AED02(matches the rebased build).bong-water-water-bong commentedon Nov 20, 2026
Already fixed on main — measured on the pinned fork source, not inferred. Closing; the two names this issue is about are printed in exactly the bucket option 2 asks for.
Fetched the file the pinned gitlink names (
1bit-MONSTER/llama.cpp @ 4eb3f08f95,ggml/src/ggml-hrx/loom-jit.cpp) and ran the checker on it:and through the module directly, on the same file:
loomc_amdgpu_emit_options_t: used-unconditional=False conditional=True, same forloomc_amdgpu_runtime_global_flags_t(93 unconditional symbols around them).Why the issue read as unfixed: the conditional modelling and this exact bucket landed in #2960,
83d5b2c ci: loomc_pair_check counts a use in an \#else` branch, which is the branch that compiles (engine#2916), merged **13:04Z** — and the census quoted here (llama.cpp#446) ran before it, so it reported the two names asmissing. Nothing in this tree needs to change today, and the arms that pin it are already in the tool's--self-test(CONDITIONAL == {"loomc_guarded_symbol"}, the#else` case, and "the same symbol used unconditionally IS missing, guard or no guard").The residual risk the issue is really pointing at is real but different: a stale census answer outlives the fix that changed it, and #446's author's explanation still stands in that PR body. If it recurs, quoting
loomc_pair_checkwithout running it is the thing to fix, not the checker.(Claimed under cl-1077 and closed without a PR — no code change was warranted.)