Skip to content

opencl: default the FA c8 cluster width to 16 on X1E (performance tuning) - #26433

Merged
lhez merged 1 commit into
ggml-org:masterfrom
qualcomm:hq/fa-c8-x1e-cluster16-r0730
Aug 12, 2026
Merged

opencl: default the FA c8 cluster width to 16 on X1E (performance tuning)#26433
lhez merged 1 commit into
ggml-org:masterfrom
qualcomm:hq/fa-c8-x1e-cluster16-r0730

Conversation

@wanghqc

@wanghqc wanghqc commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

This PR is to set a wider cluster for Adreno X1-85 based on a performance sweep run.

  • Teseted with driver 863, 6 CU; GGML_OPENCL_FA_CL_C in {0,8,16,32}).
  • DK128-GQA4 decode win on X1E: +30%/+28% at kv 4096/8192 (95.89->124.66, 97.18->124.49 GFLOPS), peaking at C=16
  • C=32 falls back to 106-110 GFLOPS
  • With DK64, GQA1, GQA8 and quantized-KV configurations all neutral.
  • The sweep shows the wider cluster wins anyway: fewer position streams per subgroup at DK=128.

Overview

Additional information

Perf gain: +30%/+28% at kv 4096/8192 (95.89->124.66, 97.18->124.49 GFLOPS), peaking at C=16.

Requirements

For Adreno X1-85 only

@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend labels Aug 2, 2026
An X1-85 sweep (driver 863, 6 CU; GGML_OPENCL_FA_CL_C in {0,8,16,32}) measured
the wider cluster as a real DK128-GQA4 decode win on X1E: +30%/+28% at kv
4096/8192 (95.89->124.66, 97.18->124.49 GFLOPS), peaking at C=16 (C=32 falls
back to 106-110 GFLOPS, so this is not thermal drift), with DK64, GQA1, GQA8
and quantized-KV configurations all neutral.

X1E was left at the kernel-default width when X2E got 16 because its compiler
holds the default width unspilled and wide-C was unmeasured there; the sweep
shows the wider cluster wins anyway (fewer position streams per subgroup is
the deciding property at DK=128, not just register pressure).
@wanghqc
wanghqc force-pushed the hq/fa-c8-x1e-cluster16-r0730 branch from bfa6314 to 311d0c2 Compare August 8, 2026 19:04
@lhez
lhez marked this pull request as ready for review August 10, 2026 18:10
@lhez
lhez requested a review from a team as a code owner August 10, 2026 18:10
@lhez
lhez merged commit 89e0aa6 into ggml-org:master Aug 12, 2026
24 of 28 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Aug 12, 2026
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>

* origin/master: (383 commits)
  cmake :  introduce semantic versioning  (ggml-org#26839)
  gguf : harden loader against malformed tensor dims and metadata types (ggml-org#25596)
  kleidiai: Add runtime feature detection mechanism for aarch64/kleidiai (ggml-org#26076)
  model : disallow integer dflash sliding_window_pattern (ggml-org#26900)
  sync : ggml
  cmake : add config version support (ggml/1582)
  server : support slot save/restore with media inputs (ggml-org#26640)
  ui: add read_media tool (ggml-org#25877)
  opencl: default FA c8 cluster width to 16 on X1E (ggml-org#26433)
  tests : update speculative params (ggml-org#26925)
  vulkan: add TQ2_0 (ternary) support (ggml-org#25850)
  wavtokenizer-dec : bound posnet/convnext block_count against n_layer_all (ggml-org#26892)
  convert : handle per_layer_config in Gemma4 (transformers 5.15) (ggml-org#26882)
  opencl: use flat mv q5_k when weight exceeds image1d_buffer_t limit (ggml-org#26880)
  chat : fix muse-glimmer detection of tool calls after EOM (ggml-org#26879)
  ci : add missing release check (ggml-org#26923)
  CUDA: only disable CUDA graphs when mul_mat_id actually needs a stream sync (ggml-org#26802)
  cuda : add warp-per-row wkv7 kernel for single-token decode (ggml-org#26111)
  spec : update speculative-simple (ggml-org#26904)
  chat : tighten bare function parsing for Qwen models (ggml-org#26793)
  ...
huaxel pushed a commit to huaxel/CachyLLama that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants