Skip to content

test-hrx-ops: the next_q8 rows accept the add-on tree and say so (engine#3085) - #471

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
npuperf/3085-next-q8-route
Nov 21, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
npuperf/3085-next-q8-route

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Refs 1bit-MONSTER/engine#3085 — the last two rows of that issue (fa_decode_next_q8., .true).

What these rows do in an add-on tree

They assert that the loom decode-split-next_q8 kernel takes the FA node. In a tree that builds the private add-on, its own FLASH_ATTN_EXT arm takes that node:

hip.fa_decode   FLASH_ATTN_EXT  Fused  priority 90   (gpu-kernels dispatch-hip-fa-decode.cpp)
  n_kv = mask->ne[0];  k->ne[1] >= n_kv;  v->ne[1] >= n_kv;  n_kv <= 2^22     -> accept, no capacity cap

so the row aborts on a name no add-on build can produce, which says nothing about the route it exists for.

What changes

Accept the tree and label what stops being asserted — the shape engine#3120 / fork #469 landed for hrx-ops-test's rows:

for (const ggml::hrx::Dispatch & dispatch : plan.dispatches) {
    const std::string scheduled_name = kernel_name_for_id(dispatch.kernel.kernel_id);
    if (scheduled_name.compare(0, 4, "hip:") == 0) {
        std::fprintf(stderr, "engine#3085: %s takes the node, so this row does NOT assert the loom "
                             "decode-split-next_q8 route (add-on tree; engine#3120/#469 pattern)\n", …);
        ggml_free(ctx);
        return;
    }
}

Why not the two alternatives, both checked against the tree:

  • a skip — the suite's only skip is device-presence (testing_suite.h:kSkipMessagePrefix), so there is no per-row mechanism to use without inventing one;
  • known_fail — the harness reports [UNEXPECTED-PASS] for a baselined row that passes, so marking these would red the no-add-on tree, where they pass today (measured: 286/290 on the bench tree, all seven fa_decode_split.* rows green).

Verified

  • -fsyntax-only with this tree's own compile command (compile_commands.json from a configured HRX build): rc 0, 0 errors.
  • On a no-add-on tree every dispatch name is a loom one, so the loop is never entered and the row behaves exactly as before — that is by construction, and it is the only tree this lane can build.
  • The add-on branch is not device-verified here: it needs a tree that builds the private add-on. The reason to expect it to pass is the matcher guard above, which is what put the node on hip.fa_decode in the first place.

This closes the last two rows of engine#3085: the split row landed in #461, the prefill row in #464, the premise guard in engine#3102, and both are on the pin.

…ine#3085)

The last two rows of engine#3085 (fa_decode_next_q8., .true) assert that the loom
decode-split-next_q8 kernel takes the FA node. In a tree that builds the private add-on its own
FLASH_ATTN_EXT arm takes that node -- hip.fa_decode registers at priority 90 and its only K/V
conditions are k->ne[1] >= mask->ne[0] and n_kv <= 2^22, i.e. no capacity cap -- so the row aborts
on a name no add-on build can produce, saying nothing about the route it exists for.

Accept the tree and LABEL what stops being asserted, which is the shape engine#3120/#469 landed for
hrx-ops-test's rows. Not a skip (the suite's only skip is device-presence) and not a known-fail: a
known-fail here would report UNEXPECTED-PASS on a no-add-on tree, where this row passes today --
measured, 286/290 on the bench tree, all seven fa_decode_split rows green.

Verified: -fsyntax-only with this tree's own compile command, rc 0, 0 errors. The add-on branch is not
device-verified here (no add-on tree in this lane); on a no-add-on tree every dispatch name is a loom
one, so the loop is never entered and the row behaves exactly as before.
@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at aac2e41: READY

Seventeen lines in one test file, and the questions are: does it fire only where it should, does it leave the no-add-on tree alone, and does the early return match the file's own idiom.

The no-add-on tree is untouched by construction, and I checked the construction. The guard is inside a loop over plan.dispatches that returns only when a scheduled name starts with hip:; in a tree without the private add-on every dispatch name is a loom_libs:/qwen3_moe: one, so the loop body never fires. That matches how the file already distinguishes the trees (kernel_name_for_id(...) == "loom_libs:…" is the existing assertion at the branch below it).

The early return is the file's own shape, not a new one. The branch immediately below this hunk (plan.dispatches.size() != 2) also ends in ggml_free(ctx); return; — same allocation lifetime, and the only heap object alive at that point is ctx (scheduler, imported, diagnostics are stack objects created after it), so nothing leaks on the new path.

Compile-safe without spending a build: every symbol it adds is already used in the same function — kernel_name_for_id (11 call sites in the file), std::fprintf, std::string — and #include <string>/<cstdio> are both present (2/2).

No pair with the other open fork PR. #470 touches tests/hrx-ops-test.cpp; this touches tests/test-hrx-ops.cpp — the two binaries the fleet has already confused once. merge-tree against the fork tip is rc 0 with 0 conflicts, and the one commit it is behind (d9ac993aa) changed only the other file, so no rebase is required.

Two notes, neither blocking:

  1. The guard is broader than the row's subject, and the message can name the wrong kernel. It fires on any hip: dispatch in the plan, and the plan here also holds the projection (qwen3_moe dense q4k_q8_1_x4_next_q8) and the rmsnorm; today the add-on's hip.fa_decode is the only hip: name in an add-on build, so the printed line is right — but the day the add-on serves a second node, this row would stop asserting the route while the message blamed that other kernel. Keying on the flash-attention dispatch itself (the FLASH_ATTN_EXT node / the front of the plan) would make the label truthful for the same one-line cost.
  2. Your "verified" section is honest about the half that is not device-proven, and I want to keep that visible: the add-on branch is asserted by reading the matcher's guard, not by a run — so if hip.fa_decode ever declines a shape where the row's K/V capacity is fine, this row would now go quiet instead of red. The stderr label is the only trace, which is why note 1 matters more than it looks.

@bong-water-water-bong
bong-water-water-bong merged commit 4f094d6 into 1bit/hrx-vulkan-patched Nov 21, 2026
@bong-water-water-bong
bong-water-water-bong deleted the npuperf/3085-next-q8-route branch November 21, 2026 06:06
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