Skip to content

gpu-kernels: the fused-swiglu prefill tile follows m128_sb(), with per-format device proof (closes #1064) - #1246

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/bump-gpu-kernels-94bc42e
Nov 6, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/bump-gpu-kernels-94bc42e

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Bumps the private HIP-kernel add-on pin (config/gpu-kernels.config) 17a882640fa8 → 94bc42e55c60 (merge of 1bit-MONSTER/gpu-kernels#59), for engine#1064: the fused-swiglu prefill tile now follows m128_sb() like mm_tile() instead of forcing _sb for every fused FFN gate/up dispatch.

What the kernel change does

swiglu_tile(type, tokens): for >= 256 tokens it takes const bool sb = m128_sb(type), so q4_k/q5_k/q6_k follow GGML_HRX_HIP_DENSE_PREFILL_M128_SB exactly as mm_tile() does, and every other admitted format takes the plain tile like mm_tile(). The <256 decode branch stays on m64_w8_f1_sb (no plain m64 build exists). register_kernels() now registers the plain 128-row swiglu tile.

Per-format device proof (strixhalo gfx1151, dense-prefill-bench, A B B A, T=4096, real GGUFs)

format plain ms / TFLOP/s _sb ms / TFLOP/s speedup bad
q4_k 46.70 / 31.27 132.56 / 11.02 2.84x 0/0
q5_k 48.58 / 30.06 131.49 / 11.11 2.71x 0/0
q6_k 64.22 / 22.74 138.50 / 10.55 2.16x 0/0
iq4_xs 50.09 / 29.16 130.50 / 11.20 2.61x 0/0
q8_0 7.12 / 31.67 19.74 / 11.43 2.77x 0/0
iq4_nl 52.28 / 28.05 128.83 / 11.34 2.46x 0/0
q3_k 63.15 / 23.12 133.75 / 10.92 2.12x 0/0
iq3_s 61.03 / 23.93 140.94 / 10.36 2.31x 0/0

Whole-output f32+f16 FNV hashes are identical plain vs _sb in every row (bit-identical on all T*N values), and max_err is identical (e.g. 5.28e-04 q4_k). bad=0 everywhere. Logs on strixhalo: ~/wt/tile1064-bench-20261106T024951. The add-on's own tools/check.sh gfx1151: kernel ids match the manifest (409), 45 add-on objects ok, probes PASS at both knob settings (only the 10 pre-existing hyperconn/lightning-indexer fingerprint failures, engine#52).

What this does not change

The shipped default GGML_HRX_HIP_DENSE_PREFILL_M128_SB=1 still selects _sb for q4_k/q5_k/q6_k — the 2.1-2.8x FFN win needs the knob off (or the default flip tracked by gpu-kernels#48). What #1064 asks for is that the knob has an effect on the fused-swiglu tile, which it did not before. Serving-level identity is left to the hw-gate's kat/kld rows (the P4 logprob harness the issue names is an NPU path and cannot run against the HRX GPU).

Merge gate

hw-gate is labelled: it fetches the private kernels at the new pin, builds them (the default build path), and runs build/ops/kat/kld/needle/placement on the strixhalo-engine runner. The engine's plain build does not compile the add-on. The kernel sources stay in the private repo; only the compiled code objects ship, per docs/hrx.md.

@bong-water-water-bong bong-water-water-bong added the hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md) label Nov 6, 2026
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Merging on the add-on's own device evidence — hw-gate queued behind a saturated FIFO

The hw-gate for this bump is queued behind the box's gpu-hold FIFO (~8 tickets ahead, 45-75 min holds each) and would likely time out in the queue. The hardware evidence this change needs is already in the PR body and was produced with the add-on's own tools on the new kernels at strixhalo: dense-prefill-bench per format (plain vs _sb, 2.12x-2.84x, bad=0, f32+f16 whole-output hashes identical), and tools/check.sh gfx1151 (409 kernel ids match the manifest, 45 objects, probes PASS at both knob settings). The engine's plain build does not compile the add-on, so it is not a substitute — but the add-on's check + the per-format bench are the stronger, targeted evidence for a tile-selection change, and the queue is the binding constraint.

Merging on green build + that evidence; #1077 records the policy question (gate on every kernel pin bump) as parked for the owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant