Repository navigation
Pin the working HRX backend for GLM-4.7-Flash - #344
bong-water-water-bong with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: bong-water-water-bong <[email protected]>
PR Reviewer Guide 🔍(Review updated until commit d9e3807)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit d753e0e |
|
Persistent review updated to latest commit 4b59b1c |
|
Persistent review updated to latest commit d9e3807 |
|
Closing this as superseded — it would move the pin backwards and revert the fix for the very defect it names. The pin it asks for is older than what
|
| main commit | third_party/llama.cpp |
third_party/hrx-system |
|---|---|---|
c18b31941 (#336) |
f2099e9b75 |
98d05d94a9 |
56624cbdb (#341) |
f2099e9b75 |
98d05d94a9 |
beec5e6bf (#342) |
cf4dfd801e |
98d05d94a9 |
621d25296 (#345, current) |
cf4dfd801e |
98d05d94a9 |
Measured with git ls-tree <commit> third_party/llama.cpp.
cf4dfd801e is a descendant of f2099e9b7 (git merge-base --is-ancestor f2099e9b7 cf4dfd801e → true) and is exactly one commit on top of it:
cf4dfd801 ggml-hrx: decode-split FA always-stage fallback (engine#314)
.../loom-libs/ops/flash_attention_decode_split_f32_f16_wmma.loom | 7 +++++--
That is #342's fix for the decode-split flash-attention defect. This PR sets the pin to f2099e9, i.e. the commit before that fix — landing it would delete the kernel fix from the release pin and reintroduce the failure class this PR says it is fixing.
Why it looks correct: stale base
The branch was cut before #342 merged (this PR was created 22:47:17Z; #342 merged 22:46:23Z), so the diff reads like a legitimate pin bump while actually being a revert. Same stale-base trap as #328 ("merge AMD's pin into our line instead of rebasing 159 commits") and #329 (closed as superseded for pinning the wrong side).
The stated goal is already satisfied on main
"AMD's core with our ggml-hrx subtree" is exactly what #336 landed — f2099e9b75 = 56c3c8a3's core + 522dab47's backend, verified by tree hash (ggml/src/ggml-hrx = 919cd999f… at both 522dab47 and f2099e9b7, and 0 files differ from 56c3c8a3 outside it). #342 adds one kernel commit on top and changes nothing else about the backend composition.
#315 is not affected by this PR
The #315 mitigation is in the pinned line (llama.cpp#94 merged 2026-10-06T07:42:52Z, common/sampling.cpp), and the pin decision was made on the runtime measurement: test-backend-ops -b HRX0 1073/1073, 0 FAIL, 0 NaN on our ggml-hrx vs 54 FAIL / 18 NaN on AMD's synced ggml-hrx (which is why #329 was closed). This PR does not touch either side of that.
What to do instead
Nothing: main is already the corrected configuration. If a GLM-4.7-Flash NaN is still reproducible on cf4dfd801e + hrx-system 98d05d94, it needs a fresh issue with the run's evidence — note that GLM-4.7-Flash is a DeepSeek2-style MLA model (head_count 20, head_count_kv 1, qk/value_head_size 256) and never takes the decode-split FA path (TARGET/059 rejects 20:1 earlier), so the decode-split kernel is not the suspect for it.
Pull request was closed
GLM-4.7-Flash produced NaN logits and HRX op-test failures with AMD’s synced
ggml-hrx. The reported working configuration pairs AMD’s core with ourggml-hrxsubtree.third_party/llama.cpptof2099e9(AMD core + our backend); retainthird_party/hrx-systemat98d05d9.