Skip to content

Avoid subgroup votes in HRX decode-split flash attention - #342

Merged
bong-water-water-bong merged 2 commits into
mainfrom
copilot/hrx-loom-decode-split-fix-compile
Oct 6, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
copilot/hrx-loom-decode-split-fix-compile

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The reported D=256 compile failure involved subgroup-vote results feeding conditional branches. Later runtime testing compiled and dispatched the kernel successfully; the failure was observed with a separate CLI compiler.

  • Kernel: Pin llama.cpp to the always-stage candidate. Replace both subgroup votes with constants, forcing the existing masked-value staging path and removing the collectives:
    %key_tile_all_visible = scalar.constant false : i1
    %key_tile_any_visible = scalar.constant true : i1
    
    This stages every key tile, trading performance for a simpler path.
  • Registry: Update the recorded llama.cpp pin to match the submodule.
  • Review note: The candidate is on 1bit/fa-always-stage; .gitmodules tracks 1bit/hrx-vulkan-patched. The candidate’s masked-KV check was not the authoritative private test, and the original compile failure is no longer reproducible on demand.

Co-authored-by: bong-water-water-bong <[email protected]>
Copilot AI changed the title [WIP] Fix compile issue for HRX Loom decode-split FA with head size 256 Avoid subgroup votes in HRX decode-split flash attention Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

314 - Partially compliant

Compliant requirements:

  • Fix the compile failure of the decode-split flash-attention kernel for D=256 with 24 query heads and 4 KV heads on HRX Loom
  • Update the llama.cpp submodule to a version that resolves the compilation issue
  • Update the registry to reflect the new llama.cpp commit

Non-compliant requirements:

  • None

Requires further human verification:

  • None
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Subproject Commit Mismatch

The PR updates the llama.cpp submodule commit, but does not verify that the new commit actually resolves the compile issue described in the ticket. It's possible that the new commit may not fully address the problem or may introduce new issues.

Subproject commit cf4dfd801e6ac7cd06a42ff012ab453c9bd086da
Registry Update Consistency

The registry file is updated to reflect the new llama.cpp commit, but there is no verification that the commit hash in the registry matches the actual pinned commit in the submodule. This could lead to inconsistencies if the submodule and registry are not in sync.

"llama.cpp (hrx)": "cf4dfd801e6ac7cd06a42ff012ab453c9bd086da"

@bong-water-water-bong
bong-water-water-bong marked this pull request as ready for review October 6, 2026 22:46
@bong-water-water-bong
bong-water-water-bong merged commit beec5e6 into main Oct 6, 2026
7 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the copilot/hrx-loom-decode-split-fix-compile branch October 6, 2026 22:46
bong-water-water-bong pushed a commit that referenced this pull request Nov 14, 2026
… MTP-drafter crash fix

The engine pins ea2d2eb07. The fork is six commits ahead and every one of them matters to something this lane has
measured today:

  a110cca  #370  alignas on the imported-buffer fixture, and the is_host relaxation
  60f7446  #371  an imported buffer is a window on an allocation, not a retagged CPU buffer
  bfdb4d4  #373  restore #357's async host-buffer fallback and the misaligned-pointer refusal
  7e91e98  #374  a mapped weight is a window too, not a retagged CPU buffer
  d9d7696  #342  the q4_0 V-cache refusal's MESSAGE named a writer that had since merged
  5996746  #376  restore the two MTP-drafter pieces

#376 is the one that makes this urgent: without it llama-server SIGSEGVs on any MTP request. Measured on gfx1151
with the real Qwen3.8-27B UD-Q4_K_XL, one request per run, llama.cpp#379's own regression arm:

  7e91e98a7 (pre-#376)   SIGSEGV in the drafter, http=000, no acceptance line
  59967468e              http=200, draft acceptance 0.64286 (9 accepted / 14 generated), mean len 2.80

so a pin at 7e91e98a7 would carry every buffer fix and still ship a server that crashes the moment MTP drafting is
enabled.

Verified at 59967468e, gfx1151:

  hrx-buffer-test       9 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 9 total  (one gpu-hold ticket)
  MTP request           http=200, acceptance 0.64286, mean len 2.80                     (llama.cpp#379's arm)
  engine build          CFG=0 BUILD=0, 136 targets, 0 errors (today's main + this submodule)

Checked rather than assumed, as before:

  .loom corpus across the range      0 files changed
  f16 ratchet fingerprint            b9b121a5ddc51854 (326 .loom) at both ends -- NO baseline change
  header changes in the range        additive only; the engine includes neither header
  gitlink sha                        59967468e9cb0f19f9535a04aa09e4166a002d8c, confirmed with git cat-file -e

Extended at cl-hrxkern's request on this PR ("move this pin to fork 59967468e instead of opening a second bump"),
which is the right call: two bumps for one branch head is how a pin trail becomes a pin essay.
bong-water-water-bong pushed a commit that referenced this pull request Nov 14, 2026
… MTP-drafter crash fix

The engine pins ea2d2eb07. The fork is six commits ahead and every one of them matters to something this lane has
measured today:

  a110cca  #370  alignas on the imported-buffer fixture, and the is_host relaxation
  60f7446  #371  an imported buffer is a window on an allocation, not a retagged CPU buffer
  bfdb4d4  #373  restore #357's async host-buffer fallback and the misaligned-pointer refusal
  7e91e98  #374  a mapped weight is a window too, not a retagged CPU buffer
  d9d7696  #342  the q4_0 V-cache refusal's MESSAGE named a writer that had since merged
  5996746  #376  restore the two MTP-drafter pieces

#376 is the one that makes this urgent: without it llama-server SIGSEGVs on any MTP request. Measured on gfx1151
with the real Qwen3.8-27B UD-Q4_K_XL, one request per run, llama.cpp#379's own regression arm:

  7e91e98a7 (pre-#376)   SIGSEGV in the drafter, http=000, no acceptance line
  59967468e              http=200, draft acceptance 0.64286 (9 accepted / 14 generated), mean len 2.80

so a pin at 7e91e98a7 would carry every buffer fix and still ship a server that crashes the moment MTP drafting is
enabled.

Verified at 59967468e, gfx1151:

  hrx-buffer-test       9 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 9 total  (one gpu-hold ticket)
  MTP request           http=200, acceptance 0.64286, mean len 2.80                     (llama.cpp#379's arm)
  engine build          CFG=0 BUILD=0, 136 targets, 0 errors (today's main + this submodule)

The registry moves with the pin. registry/architectures.json records the llama.cpp pin, so a submodule bump without
regenerating it fails ctest `registry_pins` -- `llama.cpp (hrx) recorded at ea2d2eb07, pinned at 59967468e`, which is
the one ask on this PR's first CHANGES verdict. Folded into this commit rather than a follow-up, as asked:

  tools/registry_build.py            -> registry/architectures.json (hrx 350, npu 9, architectures 350, mapped 350)
  tools/registry_build.py --check-pins -> rc 0, "records the committed pins"

The regenerated file differs from the committed one by exactly the pin line (4 diff lines, one value), so nothing
else in the registry was rewritten.

Checked rather than assumed, as before:

  .loom corpus across the range      0 files changed
  f16 ratchet fingerprint            b9b121a5ddc51854 (326 .loom) at both ends -- NO baseline change
  header changes in the range        additive only; the engine includes neither header
  gitlink sha                        59967468e9cb0f19f9535a04aa09e4166a002d8c, confirmed with git cat-file -e

Extended at cl-hrxkern's request on this PR ("move this pin to fork 59967468e instead of opening a second bump"),
which is the right call: two bumps for one branch head is how a pin trail becomes a pin essay.
bong-water-water-bong added a commit that referenced this pull request Nov 14, 2026
… MTP-drafter crash fix (#2431)

The engine pins ea2d2eb07. The fork is six commits ahead and every one of them matters to something this lane has
measured today:

  a110cca  #370  alignas on the imported-buffer fixture, and the is_host relaxation
  60f7446  #371  an imported buffer is a window on an allocation, not a retagged CPU buffer
  bfdb4d4  #373  restore #357's async host-buffer fallback and the misaligned-pointer refusal
  7e91e98  #374  a mapped weight is a window too, not a retagged CPU buffer
  d9d7696  #342  the q4_0 V-cache refusal's MESSAGE named a writer that had since merged
  5996746  #376  restore the two MTP-drafter pieces

#376 is the one that makes this urgent: without it llama-server SIGSEGVs on any MTP request. Measured on gfx1151
with the real Qwen3.8-27B UD-Q4_K_XL, one request per run, llama.cpp#379's own regression arm:

  7e91e98a7 (pre-#376)   SIGSEGV in the drafter, http=000, no acceptance line
  59967468e              http=200, draft acceptance 0.64286 (9 accepted / 14 generated), mean len 2.80

so a pin at 7e91e98a7 would carry every buffer fix and still ship a server that crashes the moment MTP drafting is
enabled.

Verified at 59967468e, gfx1151:

  hrx-buffer-test       9 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 9 total  (one gpu-hold ticket)
  MTP request           http=200, acceptance 0.64286, mean len 2.80                     (llama.cpp#379's arm)
  engine build          CFG=0 BUILD=0, 136 targets, 0 errors (today's main + this submodule)

The registry moves with the pin. registry/architectures.json records the llama.cpp pin, so a submodule bump without
regenerating it fails ctest `registry_pins` -- `llama.cpp (hrx) recorded at ea2d2eb07, pinned at 59967468e`, which is
the one ask on this PR's first CHANGES verdict. Folded into this commit rather than a follow-up, as asked:

  tools/registry_build.py            -> registry/architectures.json (hrx 350, npu 9, architectures 350, mapped 350)
  tools/registry_build.py --check-pins -> rc 0, "records the committed pins"

The regenerated file differs from the committed one by exactly the pin line (4 diff lines, one value), so nothing
else in the registry was rewritten.

Checked rather than assumed, as before:

  .loom corpus across the range      0 files changed
  f16 ratchet fingerprint            b9b121a5ddc51854 (326 .loom) at both ends -- NO baseline change
  header changes in the range        additive only; the engine includes neither header
  gitlink sha                        59967468e9cb0f19f9535a04aa09e4166a002d8c, confirmed with git cat-file -e

Extended at cl-hrxkern's request on this PR ("move this pin to fork 59967468e instead of opening a second bump"),
which is the right call: two bumps for one branch head is how a pin trail becomes a pin essay.

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.

HRX Loom decode-split FA fails to compile for D=256, 24 q heads / 4 kv heads after fork #72 (hrx-system 51b1739)

2 participants