mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2199] [CLOSED] sycl: prompt GDN recurrence with one barrier per token on Alchemist (bit-identical; A770 kernel 2.1x, prompt +3-7%) #3918
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3918
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2199
Author: @aslater3
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:a770/up-gdn-xe📝 Commits (1)
7ec7564sycl: prompt GDN recurrence with one barrier per token on Alchemist (bit-identical; A770 prompt 8K +3-5%, 32K +7%; STRATA_GDN_XE=0 for the column kernels)📊 Changes
6 files changed (+294 additions, -6 deletions)
View changed files
📝
docs/INTEL.md(+12 -0)📝
include/strata/prefill/kernels.hpp(+2 -0)📝
sycl/CMakeLists.txt(+2 -0)➕
sycl/include/strata/prefill/gdn_xe.hpp(+104 -0)📝
sycl/src/kernels/gdn_parity.cpp(+144 -4)📝
sycl/src/prefill/kernels.dp.cpp(+30 -2)📄 Description
Title
Issue: #1545, #1606 (Arc A-series prompt speed)
Summary
The prompt path's GDN recurrence on Alchemist: the column kernel needs five work-group barriers per token; this variant keeps its four row groups and FMA chains in the same order, but puts four columns x four row groups in one 16-lane sub-group, so the two cross-row-group sums become sub-group shuffles and a token needs one barrier. Bit-identical output; ~2.1x faster kernel, +3-7% prompt speed on an Arc A770.
On by default on Alchemist only (
strata::intel_gpu_gen); every other card keeps the column kernels, unchanged.STRATA_GDN_XE=0turns it off,STRATA_GDN_XE=1turns it on for any Intel GPU with 16-lane sub-groups (a reviewer with a B-series can check bits and time with it).What changed
sycl/include/strata/prefill/gdn_xe.hpp(new): the kernel (variant 6 ofgdn_recurrence_variant, 256 GRFs).sycl/src/prefill/kernels.dp.cpp: the gate (gdn_xe_on, once per process) and the dispatch;STRATA_GDN_HEAD/STRATA_GDN_REC_HEADSstill win.include/strata/prefill/kernels.hpp: the variant's comment.sycl/src/kernels/gdn_parity.cpp: a prefill section comparing variant 6 with variant 0 bit for bit (state, FP32 and FP16 outputs; T = 1, 7, 256, 1000, two seeds, the production entry point and T = 0); skips on anything that is not an Intel GPU with 16- and 32-lane sub-groups.--prefill-tokens N --prefill-repeat Rtimes both kernels.sycl/CMakeLists.txt: linksgdn_paritytostrata_prefill;ctest -R prefill_gdn_parity.docs/INTEL.md: one bullet in the Alchemist section.How it was checked
Arc A770 16 GB,
xe, Linux 7.0, oneAPI 2026.1 (JIT), Ryzen 7 3800X, 30 GB RAM. Same day,a0116b27+ #2190 + #2193 (without #2190 this card cannot start; #2193 removes a decode stall that otherwise dominates every run) with and without this commit.gdn_parity --selftest --prefill-only: 0 failures. Timing, 48 heads, 0 mismatches, max_abs 0:End to end, Coder IQ1_M,
--resident-experts --expert-cache auto --max-context 131072 --kv int8 --kv-resident 20480 --vram-reserve-mib 1200 --prefill-borrow --prefill auto --spec 4 --mtp, greedy:Output ids identical to the baseline in every run (8K
72b762d5b2a3, 32Keb3432fea981).Not run on Battlemage or i915. CUDA/HIP: SYCL-only files (plus a comment in a shared header).
Extra Notes
Tried and not taken: the same kernel with its state in SLM (no register spills, same bits, ~4x slower: 13.7 vs 3.1-3.3 ms at T=1000).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.