opencl: transpose the FA prefill K tile in local memory for perf optimization - #26428
Merged
Merged
Conversation
wanghqc
marked this pull request as ready for review
August 3, 2026 17:59
lhez
force-pushed
the
hq/fa-k-lds-transpose-pr-r0730
branch
2 times, most recently
from
August 6, 2026 01:11
22f61fe to
de775bc
Compare
lhez
approved these changes
Aug 6, 2026
max-krasnyansky
approved these changes
Aug 8, 2026
wanghqc
force-pushed
the
hq/fa-k-lds-transpose-pr-r0730
branch
from
August 8, 2026 19:04
de775bc to
59b58ee
Compare
wanghqc
added a commit
to qualcomm/llama.cpp
that referenced
this pull request
Aug 10, 2026
28 upstream commits since 687e778. One touches ggml-opencl: 689e227 (ggml-org#26428, FA prefill K-tile transpose) -- our own PR, merged upstream this window, so its four files conflicted against the x2ue originals they were carved from. Resolved to ours in all four: x2ue is a strict superset (FA_Q_HALF / FA_O_HALF, the FA*_PROBE_NO_LDS diagnostics and FA_V_LDS_T all landed on top). Verified line-by-line that no ggml-org#26428 content was lost -- the seven upstream lines absent from the merged tree are the same code reshaped by our later commits (#elif rather than #if because our probe branch precedes, mad() rather than *, Q_PRIV_TO_ACC4() around q_priv), all still reading through FA_LK/FA_LK_PAIR, plus one reworded comment. Also verified the automerge kept upstream intact: of the 659 files upstream touched, the merged tree is byte-identical to upstream/master on all but the eight we also modified, and all 247 upstream-added lines in the four auto-merged files (clip.cpp, clip-model.h, llama-context.cpp, test-backend-ops.cpp -- Muse Glimmer ggml-org#26841, multi-output sampling ggml-org#25532, Granite-Switch ggml-org#25107) are present.
huaxel
pushed a commit
to huaxel/CachyLLama
that referenced
this pull request
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR is to optimize the current FA OpenCL C kernels:
Default-on at DK ≤ 128 (the geometry where the paired read is valid);
Additional information
Earlier fleet data (pre-rebase content, unchanged kernels):
Requirements