Skip to content

Add opt-in explicit-SIMD Bonsai decode kernels for Intel GPUs - #2

Closed
dwymark wants to merge 3 commits into
sycl-ptq1-pq2-mmvqfrom
pq2-sustained-r
Closed

dwymark wants to merge 3 commits into
sycl-ptq1-pq2-mmvqfrom
pq2-sustained-r

Conversation

@dwymark

@dwymark dwymark commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

PR Body Author: 🤖 Claude Code

This PR adds opt-in explicit-SIMD decode kernels for PTQ1_0 and PQ2_0 to the SYCL backend, plus an FP16-input prefill path for both formats. Every path is off by default and enabled by environment variable.

On an Intel Arc 140V at 450c5c3, PQ2_0 decode goes from 6.8 to 9.0 tokens per second and prefill from 50 to 145. PTQ1_0 goes from 5.7 to 6.9 and from 48 to 135. FP32 output is bit-identical to the c5f6c97 arithmetic for both formats.

The logit probe, comparison scripts, and benchmark runner are the tooling behind those numbers.


For the upstream author

This branch is the head of PrismML-Eng#235, 42ce76d01, plus three commits. It fast-forwards onto sycl-ptq1-pq2-mmvq while that commit is still the head:

git fetch https://github.com/dwymark/llama.cpp pq2-sustained-r
git merge --ff-only FETCH_HEAD

Push the result and the commits land in PrismML-Eng#235 automatically. Every path added here is off by default, so the merge changes no behavior on its own. There is no expectation that this is merged; cherry-pick or copy without credit as you prefer.

dwymark and others added 3 commits September 23, 2026 12:57
Carry the explicit SIMD PQ2_0 and PTQ1_0 decode kernels, vectorized single-row state copies, the FP16-input GEMM switch, the attention decode knob, the logit probe, the comparison and perf scripts, and the model-shaped test cases onto de7a01b's 16-lane PQ2_0 kernel and gating fixes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WskiHpEsZkidixZe6TfM5R
Each experimental kernel now carries a short signpost naming what it does and which environment variable turns it on, and the remaining comments state present behaviour rather than the case they guard against.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WskiHpEsZkidixZe6TfM5R
@dwymark

dwymark commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Closing: PrismML-Eng#235 was squash-merged into prism, so the fast-forward offer no longer applies. The kernels move to a standalone pull request against prism.

Written by Claude on Daniel's instruction.

@dwymark dwymark closed this Sep 24, 2026
@dwymark
dwymark deleted the pq2-sustained-r branch September 29, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant