Skip to content

tests: assert the publication this line makes, not the fused producers f2099e9b removed (engine #449) - #126

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-449-guards
Oct 23, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
1bit/hrx-449-guards

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Closes ggml-org#449.

What ggml-org#449 asked for, and what the pin actually looks like

ggml-org#449 filed 27 *_publish_* kernels as dropped whole in f2099e9b. On the current pin the corpus has 99
kernels and none of them carries a publish name
, so this was never a matter of re-registering them.
Consumer-driven publication still happens, in the consumer:

  • common_prepare_f16_input() — if an F16 alternate already exists it is used; otherwise the plan emits
    ggml_copy_f32_f16 (registration common.mul_mat.f16) and records the alternate itself.
  • common_prepare_k16_major_f16_input() — same for the packed form: ggml_copy_f16_k16_major
    (common.mul_mat.k16_major_f16) and the F16K16Major generated resource.
  • The producers that do fuse the pack are still there and gated: ggml_rmsnorm_binary_f32_k16 via
    has_qualified_rmsnorm_k16_consumer() (512 × {4096,5120,6144,8192} or 1024 × 5120), the swiglu prefill
    kernel's f16_output_layout=1, ggml_rmsnorm_gate_f32_f16 / _q8_1_x4.

So what f2099e9b removed is the fusion of the pack into the producing dispatch — one extra dispatch per
layer on the affected paths — not the publication. Restoring the 27 loom files from f2099e9b^ would mean
rewriting them against a Loom and dispatcher that have both moved since; the measurement below says the
fused form is not worth that on this hardware.

The five guards: PASS, markers retired

guard was now asserts
generic_swiglu_k16_publish expected ggml_mul_mat_tiled_pair_input_f32_binary_publish_f32_k16 producer ggml_mul_mat_swiglu_f32_f32_wmma, the F16K16Major pack written by ggml_copy_f16_k16_major, consumed by the f16 projection
tiled_matmul_alternate_publish expected the two …_publish_* producers one dispatch writes the alternate from the projection and the f16/q8 consumer reads it; with two consumers of different formats both operands are published (Q8_1 and F16)
rmsnorm_binary_f16_output expected ggml_rmsnorm_binary_f32_f16 no such export exists; the f16 alternate comes from the copy dispatch, and the dual-publication block asserts both alternates are written and consumed
rmsnorm_binary_k16_output packed column encoded the old, wider gate column follows has_qualified_rmsnorm_k16_consumer(); hidden 7168 publishes the k16 pack and no plain f16 alternate
packed_f16_producer_consumer alternate column encoded the old publisher a row is served either by the fused packed form or by the pack copy, so it asserts the f16 output is published at all; the 32768-hidden row does get a plain f16 alternate

All five known_fail("#449") markers are removed in this commit and the rows pass. Per the brief they had to
end as PASS or be deleted — none is left as a known-fail.

Measured cost of the publication path (arm A vs arm B)

Arm B disables the whole F16/K16 operand path:
GGML_HRX_DISABLE_DISPATCH=common.mul_mat.f16,common.mul_mat.k16_major_f16,common.mul_mat_swiglu.k16_major_f16,common.rmsnorm_binary.k16_major_f16,common.rmsnorm_gate.k16_major_f16.

llama-bench -p 512 -n 128 -r 2 -dev HRX0 -ngl 99 -t 4 on strixhalo (gfx1151), 90 W cap, PCM pad (23 Oct):

model arm A (published) arm B (not published)
Qwen3-8B-Q4_K_M pp512 2070.84 ± 5.62 t/s 2115.34 ± 24.50 t/s
Qwen3-8B-Q4_K_M tg128 42.45 ± 0.05 t/s 42.53 ± 0.03 t/s

Publishing costs nothing measurable on this pair, so the shapes where the line publishes f32 / a plain copy
instead of the fused pack are not a regression — and the two rows above where no publication exists at all
(rmsnorm_binary 7168, the two-token silu graph) are ruled out on that basis rather than restored. The
30B-A3B arm and the device half of hrx-backend-test were cut short by the release-candidate holds; they
are re-queued and their numbers will land on ggml-org#449 when they run.

Also in this file (engine ggml-org#445)

This commit carries the file-side half of ggml-org#445's classification at the pin, because the two issues share the
same test tables:

  • require_compile_parameter() no longer calls std::abort() — a single wrong parameter used to kill the
    entire run instead of failing one case (it truncated two runs today).
  • router route-id binding length is ggml_nbytes(route_ids); four-token mul_mat_id shapes take
    ggml_mul_mat_id_decode_f32_wave64 (kMaximumDecodeTokens = 4); the one-token value projection takes
    llm_attention_v_matmul_set_rows_decode_f32_f32; the get-rows q8 publication is consumed either by the
    qwen q6k linear or by the packed token1 final projection.
  • known_fail("#533") on the two fused plans the command-program verifier rejects, known_fail("#534") on
    the arena-packing change, and known_fail("#445") on the five rows whose expectation still needs a ruling.

Evidence

Host suite on CPU at the pin, 66 cases:

host: 58 passed, 0 failed, 8 known-fail, 0 unexpected-pass, 66 total   (exit 0)

The fork has no CI, so that table is the gate. The device half is deferred (see above).

🤖 Generated with Claude Code

…f2099e9 removed (engine ggml-org#449)

At this pin the corpus has no publish-named kernel at all (99 kernels, none matching publish). The
consumer-driven publication survives as kernel variants plus a pack/copy dispatch that publishes the
alternate itself: common_prepare_f16_input() emits ggml_copy_f32_f16 (registration common.mul_mat.f16) and
common_prepare_k16_major_f16_input() emits ggml_copy_f16_k16_major (common.mul_mat.k16_major_f16), each
recording the alternate or generated resource its consumer asked for. So f2099e9 removed the fusion of the
pack into the producing dispatch, not the publication.

The five ggml-org#449 guards named producers that are not in the corpus, so they could only ever fail. They now
assert what the guard exists for - the f16/k16 operand is published from this value and consumed:

- generic_swiglu_k16_publish: producer ggml_mul_mat_swiglu_f32_f32_wmma, the F16K16Major pack written by
  ggml_copy_f16_k16_major and read by the f16 projection.
- tiled_matmul_alternate_publish: one dispatch writes the alternate from the projection and the f16/q8
  consumer reads it; with two consumers of different formats both operands are published (Q8_1 and F16).
- rmsnorm_binary_f16_output: there is no ggml_rmsnorm_binary_f32_f16 export; the f16 alternate comes from
  the copy dispatch, and the dual-publication block asserts both alternates are written and consumed.
- rmsnorm_binary_k16_output: the packed column follows has_qualified_rmsnorm_k16_consumer() (512 x
  {4096,5120,6144,8192} or 1024 x 5120); hidden 7168 publishes the k16 pack and no plain f16 alternate.
- packed_f16_producer_consumer: a row is served either by the fused packed form or by the pack copy, so the
  row asserts the f16 output is published at all; the 32768-hidden row does get a plain f16 alternate.

The five known_fail("ggml-org#449") markers are retired in the same commit and the rows pass.

Also in this file, from engine ggml-org#445's classification at the pin: require_compile_parameter() no longer
std::abort()s (that killed the whole run instead of failing one case - it truncated the run twice today);
the router route-id binding length is ggml_nbytes(route_ids); the four-token matmul-id shapes take
ggml_mul_mat_id_decode_f32_wave64 (kMaximumDecodeTokens = 4) rather than the wmma kernel; the one-token
value projection takes llm_attention_v_matmul_set_rows_decode_f32_f32; and the get-rows q8 publication is
consumed either by the qwen q6k linear or by the packed token1 final projection. Rows that are filed issues
carry known_fail("ggml-org#533") (two fused plans the command-program verifier rejects) and known_fail("ggml-org#534")
(disjoint transients no longer share an arena slot); rows whose expectation still needs a ruling carry
known_fail("ggml-org#445").

Host suite on CPU at the pin (66 cases): 58 passed, 0 failed, 8 known-fail, 0 unexpected-pass, exit 0. The
device half is deferred: the release-candidate build holds had priority.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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