You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HRX: hrx-backend-test and test-hrx-ops abort on stale kernel-routing expectations #444
Follow-up to #422 (llama.cpp fork #104), which makes the HRX test binaries build again on the current pin (llama.cpp 8d9ce2c1a + hrx-system d3c731e1).
Once built, two binaries abort on their first failed REQUIRE, so the rest of their cases never run:
hrx-backend-test, L3731:REQUIRE(!manual_gather_add_graph_is_supported(ctx, 2048, 13, 1, false)). The backend now supports this graph.
test-hrx-ops, first dense-matmul case:missing expected kernel: loom_libs:ggml_mul_mat_f32_f32_decode_wave64; scheduled: loom_libs:ggml_kquant_mul_mat_decode_f32. Q4_K at one token now goes to our kquant decode kernel. About 15 more cases around L4513-4558 expect decode_wave64.
The routing history mixes our commits with f2099e9b and 420b4e6fe ("take AMD's corpus wholesale"), so each expectation needs checking against the routing we actually intend. Updating them to whatever is scheduled now could hide a real regression.
To do:
Go through each failing expectation and decide whether the current route is intended. Update the test where it is; fix the routing where it isn't.
Ideally, move both binaries to the testing_suite.h runner, so one failure doesn't hide every later case and a run gives real pass/fail totals.
Hygiene pass (2026-10-18): no fixed issue to close, because the engine's HTTPS CI never builds these two binaries.
The builds here are cmake -B build -DCMAKE_BUILD_TYPE=Release with no -DONEBIT_HRX=ON (.github/workflows/ci.yml), and the HRX build (cmake/hrx.cmake) is an ExternalProject_Add(llama_hrx ...) whose BUILD_COMMAND builds only llama-server llama-bench. Neither hrx-backend-test nor test-hrx-ops is in an engine target, so no engine PR can go red on them: the fork has no CI and the engine CI does not compile them. The fork pin reached main via #441 without them building, and #451/#453 would too.
What is actually fixed and merged in 1bit-MONSTER/llama.cpp (branch 1bit/hrx-vulkan-patched, tip 953b6397):
HRX: pin llama.cpp 96f6b89, fixing #95 (GLM-4.7-Flash, Qwen3-Coder at full context) #1048dafc4a050ba: both files build again (engine#422). tests/hrx-backend-test.cpp and tests/test-hrx-ops.cpp no longer include the headers f2099e9b deleted (dispatch-symmetric-i4.h, dispatch-activation-publication.h), and the deleted eligibility predicate is no longer called. Checked at 7227a771 and 953b6397: no include of either header, neither header in ggml/src/ggml-hrx/dispatch_registration/common/, both targets still in tests/CMakeLists.txt.
So the substance of this issue is done in the fork, but it cannot be closed as verified: nothing on the engine side builds hrx-backend-test or test-hrx-ops, so "they build at the pin" has no CI evidence, and the 13 red rows are still red by design (#105 tags them; #445/#449/#450 track the rulings). Closing it here would claim a build nobody has produced at the engine pin.
Two things would make it closable:
an engine-side target (or a hw_gate step) that configures the pinned llama.cpp with GGML_HRX=ON and builds hrx-backend-test and test-hrx-ops, so the fork's test tree is gated by the engine pin rather than by hand;
the per-case totals recorded per pin in this issue.
hrx-backend-test host: 60 passed, 0 failed, 6 known-fail, 0 unexpected-pass, 66 total
device: 11 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 11 total
test-hrx-ops host: 2 passed, 0 failed, 2 total
device: 194 passed, 45 failed, 239 total (145 s, one process per case)
Two things worth recording from hrx-backend-test: zero_output_device_support now passes (it was the single device failure when the device half last ran), and common_mul_mat_id_postops_dispatch left the known-fail list without tripping UNEXPECTED-PASS — #131's fix landing under it, so the remaining six are #533 ×3, #534 ×1 and #445 ×2.
test-hrx-ops: 45 of the 45 failures were mine. The route translation merged in #128 was wrong in direction, and the device run says so plainly:
The registry publishes q8 and runs the kernel the table already named — the dispatch-kquant-decode.cpp rule describes when the decode family is eligible, not that it wins. So the table was right and #128's translation should not have replaced it. Fix in 1bit-MONSTER/llama.cpp#132: the case now accepts the table's kernel or the kquant family and prints the scheduled sequence when neither is there; plus the genuinely stale names the same log exposed — registered decode/prefill pairs (llm_attention_v_matmul_set_rows_f32_f32_wmma ↔ …_decode_f32_f32, ggml_flash_attention_f32_f16_wmma ↔ ggml_attention_rows_f32_f16, the MLA rows route already ruled in #445), and three routed-MoE shapes whose fused/next-q8 kernels are not in the sequence any more.
Host-verified: test-hrx-ops 2 passed / 0 failed. The device re-run of the fix is the one remaining item — the GPU lane went to the Qwen3.8-27B leaderboard before I could take it, so #444 stays open until that run reproduces green on hardware, and the closing comment will carry both totals at the then-current sha.
Device evidence at the pin, both binaries, one claim each (gpu-hold, HRX0 / gfx1151).
Pin pair: llama.cpp 75242f31 (= the engine pin e7e5cd08 + fork PR #148 which touches only ggml/src/ggml-hrx/graph/graph-diagnostics.cpp and the two test files) + hrx-system 82804197bc (the engine's
submodule pin), -DGGML_HRX=ON, GGML_HRX_KERNEL_CORPUS_SOURCE_FORMAT=binary, IREE_HAL_AMDGPU_LIBHSA_PATH
set (without it both binaries report "no HRX devices available" and the device half silently does not run).
Measurement label: 90 W cap, PCM pad (23 Oct). sudo -n dmesg after every claim: UFW noise only, no amdgpu
fault, reset or ring timeout.
The five hrx-backend-test known-fails are the rows that point at other open issues, not at #444: qwen_attention_postprocess_dispatch, gdn_selected_rms_q8_dispatch, qwen_routed_gate_up_dispatch (#533,
bw220's verifier rejects), disjoint_transient_plan_packing (#534, fixed in #149) and qwen_matmul_dispatch
(#445, one stale block left - see that issue).
Item 1 (both suites abort on stale routing): done. test-hrx-ops was 45/239 red when the lane reopened;
after the re-read at this pin it is 239/239 green, and hrx-backend-test is green except the rows above.
Fork PR: 1bit-MONSTER/llama.cpp#148
What the re-read changed is tables, and three code bugs found on the way:
run_qwen_matmul_dispatch_checks leaked GGML_HRX_DISABLE_QWEN_DISPATCH into the four q8-publication cases
after it, once the case got past its first stale assertion (run_cases() runs every case in one process);
the cached attention-v rows compared a route whose error has an absolute floor (f16 cache store / f16 lanes,
measured 1.95e-3 at |x| = 2 and 1.13e-3 at |x| = 0.016) against the f32 tolerance 1e-3 + 1e-4|x|.
Item 2 (stale kernel-routing expectations): the decode_wave64 translation landed in #128 and the device run
above is what settles it (require_matmul_route() accepts the table's kernel or the kquant family and prints the
scheduled sequence when neither is present).
#444 can close on this evidence once #148 is merged; #533/#534/#445 stay open on their own issues.
Fixed by fork 1bit-MONSTER/llama.cpp#148 (merged on 1bit/hrx-vulkan-patched as adef66c17): hrx-backend-test and test-hrx-ops run to the end on HRX0 at the e7e5cd08 pin with their expectation tables at the pin; a FILL constant that did not survive a graph snapshot (and broke the GCC build) and an env-flag leak between cases were fixed on the way. Remaining known-fail rows point at #570 (fusion ordering) and #534 (#149). Reaches the engine with the next llama.cpp pin bump.
Activity
bong-water-water-bong commentedon Oct 18, 2026
Hygiene pass (2026-10-18): no fixed issue to close, because the engine's HTTPS CI never builds these two binaries.
The builds here are
cmake -B build -DCMAKE_BUILD_TYPE=Releasewith no-DONEBIT_HRX=ON(.github/workflows/ci.yml), and the HRX build (cmake/hrx.cmake) is anExternalProject_Add(llama_hrx ...)whoseBUILD_COMMANDbuilds onlyllama-server llama-bench. Neitherhrx-backend-testnortest-hrx-opsis in an engine target, so no engine PR can go red on them: the fork has no CI and the engine CI does not compile them. The fork pin reachedmainvia #441 without them building, and #451/#453 would too.What is actually fixed and merged in
1bit-MONSTER/llama.cpp(branch1bit/hrx-vulkan-patched, tip953b6397):8dafc4a050ba: both files build again (engine#422).tests/hrx-backend-test.cppandtests/test-hrx-ops.cppno longer include the headersf2099e9bdeleted (dispatch-symmetric-i4.h,dispatch-activation-publication.h), and the deleted eligibility predicate is no longer called. Checked at7227a771and953b6397: no include of either header, neither header inggml/src/ggml-hrx/dispatch_registration/common/, both targets still intests/CMakeLists.txt.7227a771: the fail-fastmain()became a per-case runner, which is item 2 of this issue. A red case now reports itself and the rest still run.So the substance of this issue is done in the fork, but it cannot be closed as verified: nothing on the engine side builds
hrx-backend-testortest-hrx-ops, so "they build at the pin" has no CI evidence, and the 13 red rows are still red by design (#105 tags them; #445/#449/#450 track the rulings). Closing it here would claim a build nobody has produced at the engine pin.Two things would make it closable:
hw_gatestep) that configures the pinned llama.cpp withGGML_HRX=ONand buildshrx-backend-testandtest-hrx-ops, so the fork's test tree is gated by the engine pin rather than by hand;bong-water-water-bong commentedon Oct 23, 2026
Device pass done at fork
f1670b43+ hrx-system82804197bc(strixhalo gfx1151,gpu-hold -l 'pi issues-b' -t 14,IREE_HAL_AMDGPU_LIBHSA_PATHset, dmesg clean apart from UFW noise).Both binaries, at that pin:
Two things worth recording from
hrx-backend-test:zero_output_device_supportnow passes (it was the single device failure when the device half last ran), andcommon_mul_mat_id_postops_dispatchleft the known-fail list without trippingUNEXPECTED-PASS— #131's fix landing under it, so the remaining six are#533×3,#534×1 and#445×2.test-hrx-ops: 45 of the 45 failures were mine. The route translation merged in #128 was wrong in direction, and the device run says so plainly:The registry publishes q8 and runs the kernel the table already named — the
dispatch-kquant-decode.cpprule describes when the decode family is eligible, not that it wins. So the table was right and #128's translation should not have replaced it. Fix in 1bit-MONSTER/llama.cpp#132: the case now accepts the table's kernel or the kquant family and prints the scheduled sequence when neither is there; plus the genuinely stale names the same log exposed — registered decode/prefill pairs (llm_attention_v_matmul_set_rows_f32_f32_wmma↔…_decode_f32_f32,ggml_flash_attention_f32_f16_wmma↔ggml_attention_rows_f32_f16, the MLA rows route already ruled in #445), and three routed-MoE shapes whose fused/next-q8 kernels are not in the sequence any more.Host-verified:
test-hrx-ops2 passed / 0 failed. The device re-run of the fix is the one remaining item — the GPU lane went to the Qwen3.8-27B leaderboard before I could take it, so #444 stays open until that run reproduces green on hardware, and the closing comment will carry both totals at the then-current sha.Bump llama.cpp: 830e2c161c68 (fork #132, test-hrx-ops route expectati…
bong-water-water-bong commentedon Oct 25, 2026
Device evidence at the pin, both binaries, one claim each (
gpu-hold, HRX0 / gfx1151).Pin pair: llama.cpp
75242f31(= the engine pine7e5cd08+ fork PR #148 which touches onlyggml/src/ggml-hrx/graph/graph-diagnostics.cppand the two test files) + hrx-system82804197bc(the engine'ssubmodule pin),
-DGGML_HRX=ON,GGML_HRX_KERNEL_CORPUS_SOURCE_FORMAT=binary,IREE_HAL_AMDGPU_LIBHSA_PATHset (without it both binaries report "no HRX devices available" and the device half silently does not run).
Measurement label: 90 W cap, PCM pad (23 Oct).
sudo -n dmesgafter every claim: UFW noise only, no amdgpufault, reset or ring timeout.
The five
hrx-backend-testknown-fails are the rows that point at other open issues, not at #444:qwen_attention_postprocess_dispatch,gdn_selected_rms_q8_dispatch,qwen_routed_gate_up_dispatch(#533,bw220's verifier rejects),
disjoint_transient_plan_packing(#534, fixed in #149) andqwen_matmul_dispatch(#445, one stale block left - see that issue).
Item 1 (both suites abort on stale routing): done.
test-hrx-opswas 45/239 red when the lane reopened;after the re-read at this pin it is 239/239 green, and
hrx-backend-testis green except the rows above.Fork PR: 1bit-MONSTER/llama.cpp#148
What the re-read changed is tables, and three code bugs found on the way:
FILLconstant did not survive a graph snapshot:op_params_json()had no branch forFillParams(HRX: decode_split_next_q8 gives wrong, nondeterministic attention at short context (up to 3.66 nats between identical requests) #140),so the loader read the node back as
monostateand the constant HRX: decode_split_next_q8 gives wrong, nondeterministic attention at short context (up to 3.66 nats between identical requests) #140 put in the program-cache key was lost onany round-trip. It is also why the tree no longer builds under GCC (clang only warns);
run_qwen_matmul_dispatch_checksleakedGGML_HRX_DISABLE_QWEN_DISPATCHinto the four q8-publication casesafter it, once the case got past its first stale assertion (
run_cases()runs every case in one process);measured 1.95e-3 at |x| = 2 and 1.13e-3 at |x| = 0.016) against the f32 tolerance 1e-3 + 1e-4|x|.
Item 2 (stale kernel-routing expectations): the
decode_wave64translation landed in #128 and the device runabove is what settles it (
require_matmul_route()accepts the table's kernel or the kquant family and prints thescheduled sequence when neither is present).
#444 can close on this evidence once #148 is merged; #533/#534/#445 stay open on their own issues.
bong-water-water-bong commentedon Oct 25, 2026
Fixed by fork 1bit-MONSTER/llama.cpp#148 (merged on 1bit/hrx-vulkan-patched as adef66c17): hrx-backend-test and test-hrx-ops run to the end on HRX0 at the e7e5cd08 pin with their expectation tables at the pin; a FILL constant that did not survive a graph snapshot (and broke the GCC build) and an env-flag leak between cases were fixed on the way. Remaining known-fail rows point at #570 (fusion ordering) and #534 (#149). Reaches the engine with the next llama.cpp pin bump.
pins: llama.cpp 8d26add2c -> 42b544465 (#2954)