Skip to content

hrx: default-verbosity messages name a class, the detail moves behind GGML_HRX_REPORT - #138

Merged
bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-neutral-messages
Oct 29, 2026
Merged

bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-neutral-messages

Conversation

@bong-water-water-bong

@bong-water-water-bong bong-water-water-bong commented Oct 24, 2026 •

Copy link
Copy Markdown

Rebased onto the current tip (6b397ee9) and finished: the default verbosity now names a class, and every kernel
name, kernel id, ABI slot name and cache key sits behind GGML_HRX_REPORT.

What a default run prints

message default GGML_HRX_REPORT=1 adds
format_command() command 0 kind=Kernel kernel_id=…, bindings=N, deps=N
format_command_binding() binding value=21 origin=GraphValue access=Read range=[0, 128) the ABI slot name (lhs, gate_weight, partition_table) and the packed weight layout
plan rejection command 0 kind=Kernel: plan rejected: kernel not resolvable / …: binding count disagrees with the ABI / …: binding does not match the ABI the kernel name and its detail line
kernel corpus check kernel corpus: invalid catalog id / invalid compile recipe / repeated target variant / target variants disagree on ABI / invalid binding names / missing binding ABI kernel <name> …
executable cache load/compile <withheld: GGML_HRX_REPORT=1> where the cache key or the compiler text would be the key (kernel name + configuration) and the message

Status::log_detail(neutral, format, …) does the split and Status::detail_reported() reads the variable per
message (unset/0/false/no/off = off), so a caller or a test exercises both without recompiling. The class
keeps the command context, because which command was rejected is graph structure; the kernel name and id are the
part that describes the private kernel set. Status::log() is untouched for messages that carry no such detail.

The engine side needed no change: its startup and placement lines carry counts and ggml op classes
(MUL_MAT, RMS_NORM), not our kernels.

Verification

Tree: this branch + hrx-system 82804197bc, -DGGML_HRX=ON, label 90 W cap, PCM pad (23 Oct).

  • hrx-backend-test, host, both verbosities (GGML_HRX_REPORT unset and =1):
    65 passed, 0 failed, 1 known-fail, 0 unexpected-pass, 66 total, exit 0 in both.
  • the single known-fail is qwen_matmul_dispatch, which the open PR tests: qwen_matmul_dispatch runs to the end at the pin (engine #445) #151 fixes - it is not in this branch, and it
    is the only row either suite reports.
  • graph_import pins both verbosities itself (and clears the variable on entry, so an ambient value cannot decide
    which branch it checks): the default text has no ABI slot name, no kernel_id=, no binding/dependency counts;
    GGML_HRX_REPORT=1 brings each back. In the default log kernel_id= appears only inside those assertions.
  • device (test-hrx-ops, 239 cases, and hrx-backend-test's 11 device cases) is queued behind other agents'
    claims in ~/GPU-QUEUE and will be posted here as soon as the claim comes round; the same two suites were
    green at this tree before the redaction (hrx-backend-test 65/0/1 host + 11/11 device, test-hrx-ops 239/239
    bar the one row tests: qwen_matmul_dispatch runs to the end at the pin (engine #445) #151 fixes), and this change touches nothing they compute.

@bong-water-water-bong

Copy link
Copy Markdown
Author

Review (orchestrator): right shape - the default line keeps the failure class, the kernel ids / binding and dependency counts move behind the report level via log_detail, test updated. Stays a draft until a GGML_HRX=ON build + hrx-backend-test run (build hold after the leaderboard releases the lane, together with #136).

@bong-water-water-bong
bong-water-water-bong marked this pull request as ready for review October 25, 2026 18:40
@bong-water-water-bong

Copy link
Copy Markdown
Author

Device half, at 5f864dd3 (this branch) + hrx-system 82804197bc, one gpu-hold claim on HRX0 / gfx1151, label
90 W cap, PCM pad (23 Oct); sudo -n dmesg after the claim: UFW noise only, no amdgpu fault.

hrx-backend-test   host:   65 passed, 0 failed, 1 known-fail, 0 unexpected-pass, 66 total   (exit 0)
                   device: 11 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 11 total
test-hrx-ops       device: 238 passed, 1 failed, 239 total
                   the failure is fa_prefill_full_cache.512, which fork PR #151 fixes: that case's manual
                   matcher now schedules the projection MUL_MATs before it asks for the attention postprocess,
                   because #150's fusion-order guard refuses a match that reads a value nothing has written.

So this branch is green in both verbosities on the host and 11/11 on the device, and the single test-hrx-ops red
is the one row #151 carries — nothing this PR touches is in either suite's result.

@bong-water-water-bong

Copy link
Copy Markdown
Author

Triage from the CPU box (ryzen; no GPU here, so nothing below is a device run):

Diff read, not the title. Two commits, 6 files: ggml/src/ggml-hrx/status.h (+29) adds Status::log_detail(neutral, fmt, ...) and Status::detail_reported(), which reads GGML_HRX_REPORT per message (unset/0/false/no/off = off); runtime/kernel-executable-cache.cpp gains a disclosed() helper; dispatch/command-program-diagnostics.cpp, dispatch/command-program.cpp, kernel-corpus/kernel-corpus.cpp and tests/hrx-backend-test.cpp gate fields behind it. Text-only change — no kernel, graph or numerics edit, nothing that can alter tokens out.

Ancestry (the thing worth checking before a bump): e7e5cd08 (the engine pin) is an ancestor of 5f864dd3a, and the branch has 0 commits the pin does not — the branch is a strict superset, 7 commits ahead, including 8ee20a0 (the tree the current leaderboard rows were measured on). So this lands cleanly on top of the pinned lineage.

Checks: the repo has no CI — gh pr checks 138 reports "no checks reported". That makes the PR body's own numbers the only host-side evidence (65 passed / 0 failed / 1 known-fail qwen_matmul_dispatch, which #151 fixes, in both verbosities), and the body itself says the 11 device cases plus test-hrx-ops are still queued on the GPU.

Verdict: needs work — the missing piece is the device arm the body promises, not the code. I am not merging it while that is outstanding and while the measurement pass owns this box. Post the device numbers when the GPU lane is free and it is a one-sentence-risk merge: "log text only, gated behind GGML_HRX_REPORT, no effect on tokens or timing".

bong-water-water-bong and others added 2 commits October 29, 2026 12:15
… GGML_HRX_REPORT

A rejected plan or a bad corpus entry used to put the kernel name, the kernel id, the binding count and the
ABI names straight into the message that a default run prints. Those describe the kernel set itself, so the
default text now carries the class of failure and the detail is kept when `GGML_HRX_REPORT` is set.

- `Status::log_detail(neutral, format, ...)` keeps the neutral class by default and the formatted detail when
  `GGML_HRX_REPORT` is truthy (unset/0/false/no/off = off); `Status::detail_reported()` reads it per message,
  so a caller or a test can exercise both. `Status::log()` is unchanged for messages that carry no such detail.
- `dispatch/command-program-diagnostics.cpp`: `format_command()` always writes `command N kind=Kernel`, and
  appends `kernel_id=`, `bindings=`, `deps=` only in report mode. This is the one place every
  command-context message is built from, so the behaviour change lands without touching dozens of call sites.
- `dispatch/command-program.cpp` (4 messages) and `kernel-corpus/kernel-corpus.cpp` (8 messages): the
  kernel-naming forms go through `log_detail` with a class such as `plan rejected: binding count disagrees
  with the ABI` / `kernel corpus: invalid catalog id`.
- `tests/hrx-backend-test.cpp`: the three assertions that pinned the detail text now check the neutral class by
  default and the detail after setting `GGML_HRX_REPORT=1`, so both paths are covered.

Checked on the host with the suite (66 cases, no device): `59 passed, 1 failed, 6 known-fail` in **both**
modes — the single failure was one of the assertions above, updated in this commit. In the default log the
string `kernel_id=` no longer appears in any message (only in a test's own assertion text).

The engine side needed no change: its startup and placement lines carry counts and `ggml` op classes
(`MUL_MAT`, `RMS_NORM`), not our kernels.

Not yet built or run after the last test edit — the build lane is committed to other work right now; the
verification for this exact tree is a `ninja hrx-backend-test` plus the host suite, which I will run and paste
here as soon as the lane frees up.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Continuation of the default-verbosity work on the current fork tip (`6b397ee9`), found by re-reading what a
default run still prints:

- `format_command_binding()` printed the ABI slot name (`gate_weight`, `partition_table`, ...) and the packed
  weight layout in every command-context message. Both now sit behind `GGML_HRX_REPORT`; the graph-side facts
  (value, origin, access, range) stay, so a message still says what was bound and where.
- the ABI-mismatch and unresolvable-kernel messages in `command-program.cpp` carry a neutral class that keeps the
  command context (`command 0 kind=Kernel: plan rejected: ...`) - which command was rejected is graph structure,
  the kernel name and id are not.
- `runtime/kernel-executable-cache.cpp`: the cache key is a kernel name plus its configuration, and it appeared in
  every load/compile failure through `key`, `error_message` or a direct `kernel %s`. All of those log lines now
  pass through one `disclosed()` helper, so a default run names the failure class and `GGML_HRX_REPORT=1` names
  the key. <withheld: GGML_HRX_REPORT=1> is what a default line shows instead.

Tests: `graph_import` now pins both verbosities - the default text has no ABI slot names, no kernel id, no
binding/dependency counts, and `GGML_HRX_REPORT=1` brings them back - and it clears the variable on entry so an
ambient value cannot decide which branch it checks. The slot-name assertions in the resolve/verify error cases
pin the graph-side text instead of the name.

Both modes on the host, hrx-system `82804197bc`: **65 passed, 0 failed, 1 known-fail, 0 unexpected-pass, 66
total** (`GGML_HRX_REPORT` unset and `=1`). The one known-fail is `qwen_matmul_dispatch`, which fork PR #151
fixes; it is not in this branch. `kernel_id=` appears in the default log only where the test asserts its absence.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@bong-water-water-bong

Copy link
Copy Markdown
Author

Rebased onto the current base and re-measured hrx-backend-test in both verbosities, against the untouched base as a control at the same pins.

Pins used

what pin
base 1bit/hrx-vulkan-patched 40c4ccb76e48aafd44e024b0d2bb27b38bf54015 (…#153)
this branch, rebased (head) 57d140468172f0b73386c319e6ecd931a127ef0e — the two commits of this PR on top of the base above, rebase applied with no conflicts
hrx-system (HRX_SOURCE_DIR) 82804197bcbe060b1371d6548337fdc842034cdd — the pin config/hrx-long-prompt-validated-pin.config names and config/hrx-system-hold.config holds
gpu-kernels add-on (GGML_HRX_HIP_ADDON_DIR) 17a882640fa88e78ec92af42703a0707a6b7a061, addons/hip-hrx — the pin config/gpu-kernels.config records; 47 kernels/*.hip, 44 *.cpp
HIP compiler amdclang++ (ROCm SDK gfx1201-devel), -DGGML_HRX_HIP_TARGETS=gfx1151 -DGGML_HRX_HIP_FLAGS=-O3

Both trees were configured identically apart from the source directory: -DCMAKE_BUILD_TYPE=Release -DGGML_HRX=ON -DGGML_HRX_KERNEL_CORPUS_SOURCE_FORMAT=binary -DGGML_VULKAN=OFF -DGGML_NATIVE=ON -DGGML_BUILD_TESTS=OFF -DLLAMA_BUILD_TESTS=ON, gcc/g++ with -Wno-error, ninja hrx-backend-test.

Counts (host cases; device: skipped, no HRX devices available)

tree GGML_HRX_REPORT result
base 40c4ccb76 unset 56 passed, 10 failed, 0 known-fail, 66 total
base 40c4ccb76 =1 56 passed, 10 failed, 0 known-fail, 66 total
head 57d140468 unset 56 passed, 10 failed, 0 known-fail, 66 total
head 57d140468 =1 56 passed, 10 failed, 0 known-fail, 66 total

Each configuration was run three times; the counts and the fail set were identical every run. The 11 device cases were not run (this host has no HRX device), so the numbers above are host cases only.

The ten failures are the same names on base and on the head, in all four runs (diff of the sorted fail lists is empty):

common_mul_mat_id_postops_dispatch
common_mul_mat_id_swiglu_dispatch
gdn_native_projection_pair_dispatch
qwen_attention_postprocess_dispatch
qwen_flash_attention_dispatch
qwen_matmul_dispatch
qwen_routed_gate_up_dispatch
qwen_weighted_reduce_next_rmsnorm_q8_publication
rmsnorm_binary_f16_output
tiled_matmul_alternate_publish

Every remaining failure also fails on the untouched base at the same pins; this branch adds none and fixes none. They are dispatch-name / publication expectations that track the add-on pin, which is why the count is 10 here and was 5–6 at the older 34-kernel add-on pin the earlier numbers came from — the head/base comparison is what carries the signal, not the absolute count.

The cases this PR actually edits pass in both verbosities: graph_import (it pins both verbosities itself, unsetenv on entry, so an ambient value cannot decide which branch it checks), graph_import_mixed_backend_boundary, and dispatch_registry. Nothing in the default run prints kernel_id=, an ABI slot name or a cache key, which is what the change asks for.

Diff scope is unchanged by the rebase: 6 files, +174/−54 —

ggml/src/ggml-hrx/dispatch/command-program-diagnostics.cpp   21 ++++--
ggml/src/ggml-hrx/dispatch/command-program.cpp               33 +++++---
ggml/src/ggml-hrx/kernel-corpus/kernel-corpus.cpp            23 ++++--
ggml/src/ggml-hrx/runtime/kernel-executable-cache.cpp        45 +++++++---
ggml/src/ggml-hrx/status.h                                   29 ++++++
tests/hrx-backend-test.cpp                                   77 ++++++++++++----

Reproducing

# base control
git checkout 40c4ccb76e48aafd44e024b0d2bb27b38bf54015
cmake -S . -B build-base -G Ninja -DCMAKE_BUILD_TYPE=Release -DGGML_HRX=ON \
  -DHRX_SOURCE_DIR=<hrx-system @82804197bcbe060b1371d6548337fdc842034cdd> \
  -DGGML_HRX_HIP_ADDON_DIR=<gpu-kernels @17a882640fa88e78ec92af42703a0707a6b7a061>/addons/hip-hrx \
  -DGGML_HRX_HIP_COMPILER=<rocm>/bin/amdclang++ -DGGML_HRX_HIP_TARGETS=gfx1151 \
  -DGGML_VULKAN=OFF -DGGML_NATIVE=ON -DGGML_BUILD_TESTS=OFF -DLLAMA_BUILD_TESTS=ON
ninja -C build-base -j14 hrx-backend-test
env -u GGML_HRX_REPORT ./build-base/bin/hrx-backend-test   # 56/10
GGML_HRX_REPORT=1       ./build-base/bin/hrx-backend-test   # 56/10

# head: same configure, source at 57d140468 → 56/10 in both verbosities, same fail set

The branch was force-pushed with --force-with-lease to 1bit/hrx-neutral-messages only; nothing else in the fork was rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant