Skip to content

tests: per-case runner and the #445 ACCEPT rows - #105

Merged
bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-test-445-ruling
Oct 18, 2026
Merged

bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-test-445-ruling

Conversation

@bong-water-water-bong

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

Copy link
Copy Markdown

Engine #445's ruling (table accepted) carried onto the suite that #104 rewrote. Two parts:

  1. The runner. main() was one fail-fast sequence of run_*() calls, so the first red case hid every case
    after it - and hrx: the fused F16 routed-FFN decodes the table with the layout it was written with (engine#2861) #445 keeps 9 REGRESSION rows red on purpose, so the suite could never report past them. main()
    is now a table of cases plus a runner that prints [PASS]/[FAIL] per case and totals, and exits non-zero if
    any case failed. REQUIRE throws a RequirementFailure that the runner catches instead of std::abort(); every
    case keeps its own expectations, and a case still stops at its own first failure.

  2. The ACCEPT rows this tree still had stale, each citing its hrx: the fused F16 routed-FFN decodes the table with the layout it was written with (engine#2861) #445 row in the code:

    • gather_add_dispatch - (2048, 13, 1, false), the 96-hidden variant and the partial graph are claimed
      through the generic path now (ggml_get_rows_f32 x2 + ggml_binary_strided_f32, 3 dispatches) where they
      were refused; the canonical shape still fuses to hrx:ggml_gather_add_f32 and the strided-coalesced variant
      is still refused.
    • swiglu_q8_output - the q8-output publish kernel went with f2099e9; the shape is the kquant swiglu decode
      feeding the kquant matmul decode, which reads f32, so there is no producer or alternate to bind.
    • qwen_flash_attention_dispatch - a QK-layout (MLA) shape routes to ggml_attention_rows_f32_f16 (strided
      extents, 5 bindings, no gate) instead of the flash kernel; the gated transposed F16 variant is claimed now,
      the F32-value one is still refused.
    • rmsnorm_gate_packed_output, rmsnorm_gate_q8_output, qwen_token_embedding_dispatch and
      gdn_native_projection_pair_dispatch were already made by tests: build the HRX tests against the ggml-hrx we ship (engine#422) #104; iq2_codebook_resource_reuse no longer exists
      (its codebook path is gone from the backend); generic_swiglu_k16_publication_edges was dropped by tests: build the HRX tests against the ggml-hrx we ship (engine#422) #104 and is
      not re-added.

Gate: this table (the fork has no CI)

1bit-MONSTER/llama.cpp runs no checks on this branch, so the local host run below is the gate, not a CI result.
CPU only (ryzen), no HRX device present, so the device cases skip:

host: 60 case(s)
host: 47 passed, 13 failed, 60 total
device: skipped, no HRX devices available
Case Result
status pass
command_plan_metadata pass
dispatch_registry pass
graph_import pass
graph_import_mixed_backend_boundary pass
graph_view_external_use pass
scale_f32_dispatch pass
cont_f32_dispatch pass
binary_f32_broadcast_dispatch pass
graph_snapshot_diagnostics pass
unmatched_graph_diagnostics pass
completion_counter_plan pass
graph_index pass
rope_set_rows_dispatch pass
graph_traversal pass
qwen_token_embedding_dispatch pass
gather_add_dispatch pass
qwen_flash_attention_dispatch pass
qwen_attention_postprocess_dispatch FAIL
qwen_matmul_dispatch FAIL
packed_f16_producer_consumer pass
k16_major_preparation_reuse pass
rmsnorm_binary_k16_output pass
swiglu_q8_output pass
rmsnorm_gate_packed_output pass
rmsnorm_gate_q8_output pass
lowtoken_residual_dispatch FAIL
quantized_conv4_dispatch pass
gdn_rmsnorm_gate_dispatch pass
gdn_native_projection_pair_dispatch pass
gdn_selected_snapshot_dispatch pass
gdn_selected_rms_q8_dispatch FAIL
llama_attention_matmul_dispatch pass
quantized_value_projection_dispatch FAIL
schedule_qwen_terminal_q6k_q8_command.tokens1 FAIL
schedule_qwen_terminal_q6k_q8_command.tokens18 pass
schedule_get_rows_q8_1_alternate_command.q4_k FAIL
schedule_get_rows_q8_1_alternate_command.bf16 FAIL
qwen_router_top8_dispatch FAIL
common_mul_mat_id_swiglu_dispatch FAIL
qwen_routed_gate_up_dispatch FAIL
common_mul_mat_id_postops_dispatch FAIL
alias_value_import pass
multi_dispatch pass
layout_alias_scheduler_elision pass
zero_output_scheduler_elision pass
transient_import pass
graph_view_preserves_shared_output_storage pass
chained_dispatch_requires_transients pass
graph_replay_host_staging_is_not_ineligible pass
multiple_transient_plan pass
disjoint_transient_plan_packing FAIL
command_program_kernel_dump pass
command_shape_hash pass
graph_program_cache_uid_mismatch pass
graph_match_hash_collision pass
graph_match_bijection pass
validated_graph_uid_match pass
graph_executor_contract pass
loom_async_jit_environment pass

The 13 red rows are the #445 rows outside the accepted set: class A plan-shape rows
(qwen_attention_postprocess, qwen_matmul, lowtoken_residual, disjoint_transient_plan_packing,
gdn_selected_rms_q8), class B kernel-name rows (quantized_value_projection, qwen_terminal_q6k_q8.tokens1,
get_rows_q8_1_alternate x2, common_mul_mat_id_swiglu, qwen_routed_gate_up, common_mul_mat_id_postops) and
the NEEDS-DEVICE row qwen_router_top8_dispatch, which stays red as ruled.

One thing the owner should see

The 9 REGRESSION rows from #445 do not protect anything on this branch any more: six of the cases no longer exist in
#104's suite (generic_swiglu_k16_publish, tiled_matmul_alternate_publish, rmsnorm_binary_f16_output,
qwen_decode_publication_consumer_qualification, qwen_weighted_reduce_next_rmsnorm_q8_publication,
symmetric_i4_consumer_qualification), and the three that remain (packed_f16_producer_consumer,
rmsnorm_binary_k16_output, gdn_rmsnorm_gate_dispatch) pass, i.e. their expectations were rewritten to the current
plans. That is the opposite of the ruling's "keep them red", and it means #449 and #450 have no test in the way of
their regressions being accepted by default. I left them exactly as #104 left them, as this task said.

Related: engine #445 (ruling), #449 (publication dropped in f2099e9), #450 (symmetric-i4 route re-enabled).

🤖 Generated with Claude Code

Owner approved the known-regression follow-up. Added to this PR (#105 is still open, so no stacked
PR): the accepted regressions become guards that cannot be quietly accepted.

1. KNOWN-FAIL in the runner

A case can carry known_fail("#449") or known_fail("#450"). It must fail while the regression stands: the
runner prints [KNOWN-FAIL #449] / [KNOWN-FAIL #450] and counts those apart from the suite's own failures, so
the exit code is driven only by real [FAIL] rows. If a known-fail case passes, the runner prints
[UNEXPECTED-PASS #nnn] and exits non-zero - someone fixed or changed it, so the marker has to be retired on
purpose instead of silently rotting.

2. The six cases #104 deleted, back with their original expectations

Restored verbatim from the pre-#104 file (the plan each regression net was built to protect), adapted only where
the API no longer has the member: activation_publication_diagnostics() is alternate_values() now
(graph_value/type), and common_symmetric_i4_lowrow_mul_mat_eligible() lived in
dispatch-registration/common/dispatch-symmetric-i4.h, which f2099e9 deleted with the route switch it guarded.

3. The three #104 had rewritten to pass, back to their original expectations, tagged #449

packed_f16_producer_consumer, rmsnorm_binary_k16_output, gdn_rmsnorm_gate_dispatch.

Gate: this table (the fork has no CI)

1bit-MONSTER/llama.cpp runs no checks on this branch. CPU only (ryzen), no HRX device, so the device cases
skip. Command: cmake --build build --target hrx-backend-test && ./build/bin/hrx-backend-test.

host: 66 case(s)
host: 44 passed, 13 failed, 9 known-fail, 0 unexpected-pass, 66 total
device: skipped, no HRX devices available
Case Result
status pass
command_plan_metadata pass
dispatch_registry pass
graph_import pass
graph_import_mixed_backend_boundary pass
graph_view_external_use pass
scale_f32_dispatch pass
cont_f32_dispatch pass
binary_f32_broadcast_dispatch pass
graph_snapshot_diagnostics pass
unmatched_graph_diagnostics pass
completion_counter_plan pass
graph_index pass
rope_set_rows_dispatch pass
graph_traversal pass
qwen_token_embedding_dispatch pass
gather_add_dispatch pass
qwen_flash_attention_dispatch pass
qwen_attention_postprocess_dispatch FAIL
qwen_matmul_dispatch FAIL
packed_f16_producer_consumer KNOWN-FAIL #449
k16_major_preparation_reuse pass
rmsnorm_binary_k16_output KNOWN-FAIL #449
swiglu_q8_output pass
rmsnorm_gate_packed_output pass
rmsnorm_gate_q8_output pass
lowtoken_residual_dispatch FAIL
quantized_conv4_dispatch pass
gdn_rmsnorm_gate_dispatch KNOWN-FAIL #449
gdn_native_projection_pair_dispatch pass
gdn_selected_snapshot_dispatch pass
gdn_selected_rms_q8_dispatch FAIL
llama_attention_matmul_dispatch pass
quantized_value_projection_dispatch FAIL
schedule_qwen_terminal_q6k_q8_command.tokens1 FAIL
schedule_qwen_terminal_q6k_q8_command.tokens18 pass
schedule_get_rows_q8_1_alternate_command.q4_k FAIL
schedule_get_rows_q8_1_alternate_command.bf16 FAIL
qwen_router_top8_dispatch FAIL
common_mul_mat_id_swiglu_dispatch FAIL
qwen_routed_gate_up_dispatch FAIL
common_mul_mat_id_postops_dispatch FAIL
alias_value_import pass
multi_dispatch pass
layout_alias_scheduler_elision pass
zero_output_scheduler_elision pass
transient_import pass
graph_view_preserves_shared_output_storage pass
chained_dispatch_requires_transients pass
graph_replay_host_staging_is_not_ineligible pass
multiple_transient_plan pass
disjoint_transient_plan_packing FAIL
command_program_kernel_dump pass
command_shape_hash pass
graph_program_cache_uid_mismatch pass
graph_match_hash_collision pass
graph_match_bijection pass
validated_graph_uid_match pass
graph_executor_contract pass
loom_async_jit_environment pass
generic_swiglu_k16_publish KNOWN-FAIL #449
tiled_matmul_alternate_publish KNOWN-FAIL #449
rmsnorm_binary_f16_output KNOWN-FAIL #449
qwen_decode_publication_consumer_qualification KNOWN-FAIL #449
qwen_weighted_reduce_next_rmsnorm_q8_publication KNOWN-FAIL #449
symmetric_i4_consumer_qualification KNOWN-FAIL #450

All nine tagged rows report KNOWN-FAIL, none UNEXPECTED-PASS, and the 13 real FAIL rows are exactly the ones
#105 reports (class A plan-shape, class B kernel-name, and qwen_router_top8_dispatch NEEDS-DEVICE) - so the rest
of the table is unchanged and the accepted regressions are visible without being failures.

Deferred device work (recorded in ~/NEED-GPU-T422.md): the 14 device cases, the qwen_router_top8 measurement,
the symmetric-i4 on/off measurement, and the MLA (QK-layout) flash_attention shape that now routes to
ggml_attention_rows_f32_f16: same model/prompt/-ub, measure kernel time or tok/s for the rows route vs the
flash kernel and logits/argmax equality, after the #315 cell.

Related: engine #445 (ruling), #449 (publication), #450 (symmetric-i4 route).

🤖 Generated with Claude Code

#450 marker retired (commit 63644da5)

Engine #450 was re-measured on hardware and the accepted regression is not one. Qwen3-4B-Q5_K_M on gfx1151, route on vs off (GGML_HRX_DISABLE_DISPATCH=common.rmsnorm_binary_symmetric_i4_k32), -dev HRX0 -ngl 99 -t 4:

route on route off
pp512 3033.38 ± 23.60 2991.08 ± 39.41
pp2048 2647.52 ± 95.31 2613.31 ± 117.61
tg64 65.65 ± 0.36 63.61 ± 0.11

Held-out Gutenberg text (Pride and Prejudice + Moby Dick): PPL 16.3451 ± 0.74733 over 20 chunks, cross-arm KLD over 5 chunks 0.000000 ± 0.000000 (max 0.000056, max Δp 0.005 %), and three 64-token greedy completions byte-identical (931 bytes each). f2099e9b's "substantial numerical performance regression" is not observable on AMD's current kernels.

So symmetric_i4_consumer_qualification now states what ships: its qualifying graphs (Q5_K/IQ4_XS weight consuming the normalised value, directly or through a reshape) select loom_libs:ggml_rmsnorm_binary_symmetric_i4_k32, and a graph with no such consumer does not. Its old q8-publication assertions are #449's territory and stay with the guards there.

Host suite now: 66 cases - 45 passed, 13 failed, 8 known-fail, 0 unexpected-pass (was 44/13/9). #450 closes when this merges.

The suite is one fail-fast main(), so one red case hides every case after it - and engine #445
keeps 9 REGRESSION rows red on purpose. Replace main() with a table of cases and a runner that
reports [PASS]/[FAIL] per case plus totals and exits non-zero if any case failed. REQUIRE throws
a RequirementFailure that the runner catches instead of calling std::abort(); each case keeps its
own expectations, so a red row is a row and not the end of the run.

Then take the #445 ACCEPT rows this tree still had stale (#104 had already made some):

- gather_add_dispatch: the (2048, 13, 1, false) manual graph, the 96-hidden variant and the
  partial graph are claimed through the generic path now (get_rows x2 + binary_strided, three
  dispatches) where they were refused; the canonical shape still fuses to
  hrx:ggml_gather_add_f32, and the strided-coalesced variant is still refused.
- swiglu_q8_output: the q8-output publish kernel went with f2099e9; the shape is the kquant
  swiglu decode feeding the kquant matmul decode, which reads f32, so there is no producer or
  alternate to bind.
- qwen_flash_attention_dispatch: a QK-layout (MLA) shape routes to ggml_attention_rows_f32_f16
  (strided extents, bindings 5, no gate) rather than the flash kernel; the gated transposed F16
  variant is claimed now, the F32-value one is still refused.

Not re-added: generic_swiglu_k16_publication_edges, whose case #104 dropped. Left as they are:
the REGRESSION rows and qwen_router_top8_dispatch (NEEDS-DEVICE).

Host suite here: 47 passed, 13 failed, 60 total; device cases skipped (no HRX device).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ine #445)

Owner approved turning the accepted regressions into guards that cannot be quietly accepted. Adds a
KNOWN-FAIL status to the case runner and restores the cases the ruling was about.

Runner: a case can carry known_fail("#449") or known_fail("#450"). It must fail while the regression
stands: the runner prints [KNOWN-FAIL #449]/[KNOWN-FAIL #450] and counts those apart from the suite's
own failures, so the exit code is driven only by real FAILs (and by an UNEXPECTED-PASS, which prints
[UNEXPECTED-PASS #nnn] and exits non-zero: someone fixed or changed it, so the marker has to be
retired on purpose).

Restored with their original pre-#104 expectations (the plan each regression net was built to
protect), adapted only to compile against the current API - activation_publication_diagnostics() is
alternate_values() now, and common_symmetric_i4_lowrow_mul_mat_eligible() lived in the header
f2099e9 deleted:

  #449 (publication dropped whole in f2099e9)
    generic_swiglu_k16_publish, tiled_matmul_alternate_publish, rmsnorm_binary_f16_output,
    qwen_decode_publication_consumer_qualification,
    qwen_weighted_reduce_next_rmsnorm_q8_publication - re-added, #104 had deleted them
    packed_f16_producer_consumer, rmsnorm_binary_k16_output, gdn_rmsnorm_gate_dispatch - the three
    #104 had rewritten to pass, put back to their original expectations

  #450 (symmetric-i4 consumer route re-enabled in aadd602)
    symmetric_i4_consumer_qualification - re-added, #104 had deleted it

Host suite here: 66 case(s): 44 passed, 13 failed, 9 known-fail, 0 unexpected-pass. The 13 failures
are the same rows #105 reports (class A plan-shape, class B kernel-name, and the NEEDS-DEVICE
qwen_router_top8_dispatch), so the accepted regressions are visible without being failures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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