Skip to content

Bump HRX pin: long-context flash-attention fix (hrx-system e2bed427 + live-out patch, llama.cpp multiple_of) - #385

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
1bit/pin-hrx-longctx-fix
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
1bit/pin-hrx-longctx-fix

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Moves the HRX pin to the AMD-tested pair with our fix for the long-context flash-attention miscompile.

Clean-room GPU gate at these exact SHAs (fresh checkout, not a dev worktree): build 0/0/0, kernel corpus 123/123, Qwen3-0.6B needle 20/20 @4732 and 5/5 @4432 (clean e2bed427 without the fix: 0/20), FA stress 0 NaN, test-backend-ops -b HRX0 1073/1073, KLD vs the pre-regression 98d05d94 lineage = 0.000000. coder-llm (PR-Agent) unharmed, no ring timeouts, no thermtrip.

Upstream regression report drafted for AMD. At the next AMD bump, re-check the live-out patch still applies (drop it if AMD adds back-edge coverage to extend_boundaries).

🤖 Generated with Claude Code

…6bf9950b (multiple_of)

Moves third_party/hrx-system 98d05d94 -> cc8ec428 (AMD e2bed427 + our live-out-demand fix for the long-context flash-attention miscompile from ba07714dd) and third_party/llama.cpp 0e255d77 -> 16bf9950b (mul -> multiple_of predicate rename, required to link against e2bed427).

Clean-room GPU gate at these exact SHAs: build 0/0/0, corpus 123/123, Qwen3-0.6B needle 20/20 @4732 + 5/5 @4432, FA stress 0 NaN, test-backend-ops -b HRX0 1073/1073, KLD vs 98d05d94 = 0. coder-llm unharmed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1 - Partially compliant

Compliant requirements:

  • GGUF reader and dequant support implemented
  • Qwen3 decoder in fp32 implemented
  • Loading fails on missing/misshaped/unused tensors
  • Unit tests added for GGUF and dequant
  • Golden test against HF transformers fp32 logits
  • Documentation updated

Non-compliant requirements:

  • Thread pool not explicitly mentioned in diff

Requires further human verification:

  • Verification of thread pool implementation in core

97 - Partially compliant

Compliant requirements:

  • Default context size set to 32768 for --device hrx
  • Explicit --ctx-size still wins
  • --prefill-device hrx unchanged
  • Docs updated in serve.md, registry.md, and PORTING

Non-compliant requirements:

  • No explicit verification of Qwen3-Coder-30B-A3B answering "Paris" in diff

Requires further human verification:

  • Verification of Qwen3-Coder-30B-A3B answering "Paris" on Strix Halo
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Subproject Commit Update

The HRX pin has been updated to a new commit that includes a fix for long-context flash-attention miscompile. This change is critical for ensuring correct behavior on HRX hardware, especially with models that require extended context sizes. The update should be verified for compatibility and correctness with the existing codebase.

Subproject commit cc8ec428146ea0b1eef6d514e6d604eda5e52b97
Subproject Commit Update

The llama.cpp subproject has been updated to a new commit that includes changes required for linking against the updated hrx-system. This includes a rename of the mul -> multiple_of predicate, which is necessary for compatibility. The update should be verified to ensure no regressions or compatibility issues.

Subproject commit 16bf9950b102e7cbaef3262dc9e1e6c8db552aa2

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Not landing. Decision (owner 2026-10-10): the engine stays on OUR HRX line (hrx-system 98d05d94 / llama.cpp 0e255d77). AMD's e2bed427 decode line and the whole ba07714dd bisect/fix are reference + disclosure material, not an engine pin. The live-out fix (fork hrx-system cc8ec428) and the regression repro remain as the AMD disclosure; the engine does not switch lines. check_pins correctly flagged this as a diverged line switch.

@bong-water-water-bong
bong-water-water-bong deleted the 1bit/pin-hrx-longctx-fix branch October 11, 2026 00:15
bong-water-water-bong added a commit that referenced this pull request Nov 14, 2026
…nges, one fixture, one test assertion (#2452)

Four commits on the fork head c84f0fc6e, six files:

  f3d177a40  hrx-backend-test: assert the add-on path instead of labelling it (#386, this lane)
  ea70c036f  common/sampling: fast-greedy predicate + argmax as functions, offline test, min_p clamp (#387)
  ee714edaa  tests: blackmamba synthetic fixture gets the expert hparams its MoE branch needs (#384)
  5e8f13e16  common/sampling: greedy fast path when the sampler chain is provably an argmax (#385)

Unlike the last three bumps this one carries RUNTIME behaviour: common/sampling.cpp +94, .h +6 -- has_fast_greedy()
and argmax() extracted as predicates plus a fast path taken when the chain is provably an argmax, i.e. a change to
which tokens a greedy chain produces. "It compiled" is not evidence for that, so the evidence is a real run of the
test that came with it:

  tests/test-sampling-fast-greedy.cpp (LABEL behavior)
    BUILD_RC=0   RUN_RC=0   ->  "test-sampling-fast-greedy: OK"

CPU-only, which matters: ~/GPU-TOKEN has been cl-hrxkern, cl1051-c4-t2g and hw-gate runs all evening, so the two
device checks this lane still owes on #2448 (hrx-buffer-test's 9 device cases and #379's test-mtp-one-request.sh)
remain unrun and are not claimed here.

Also in the delta:
* #386 (this lane) removes the hip_addon_known_fail entry for q4k_aligned_prefill_layout.stored_copy and replaces
  it with a per-arm assertion -- measured at that PR in both ctest arms: add-on 69/0/23, -loom 92/0/0, zero
  UNEXPECTED-FAIL. Asking "permanent or temporary" there also surfaced that `found` is 3 on the add-on path and 1
  on Loom, so the case's old `found == 1` was arm-blind and had been unreachable under the label.
* #384 merged despite this lane recommending it be closed as superseded (its fixture keys duplicate the generic MoE
  block and its model line was byte-identical to #381's). Harmless, recorded so the delta is explained.

registry: regenerated for the new pin, --check-pins rc 0.
Not claimed: end-to-end greedy/KLD parity at this pin -- that needs a model on the device.

Co-authored-by: bcloud <agent@local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant