Datasets:
section stringclasses 5
values | label stringlengths 6 17 | backend stringclasses 2
values | ngl int64 0 37 | threads int64 2 8 | prompt_tokens int64 16 256 | gen_tokens int64 64 128 | reps int64 1 3 | pp_t_s stringlengths 5 12 | tg_t_s float64 2.24 7.57 | soc_temp_c stringclasses 3
values | notes stringlengths 5 58 |
|---|---|---|---|---|---|---|---|---|---|---|---|
layer_sweep | cpu_ngl0_median | cpu | 0 | 4 | 256 | 64 | 2 | 28.80 | 7.45 | 44-48 | median of 2 interleaved runs (28.75/7.49 and 28.86/7.40) |
layer_sweep | gpu_ngl8_median | opencl_adreno642l | 8 | 4 | 256 | 64 | 2 | 25.51 | 5.25 | 44-48 | median of 2 (25.47/5.22 and 25.55/5.27); -11% pp / -30% tg |
layer_sweep | gpu_ngl14_median | opencl_adreno642l | 14 | 4 | 256 | 64 | 2 | 22.74 | 4.14 | 44-48 | median of 2 (23.25/4.23 and 22.23/4.04); -21% pp / -44% tg |
layer_sweep | gpu_ngl20 | opencl_adreno642l | 20 | 4 | 256 | 64 | 3 | 20.74 | 3.32 | 44-48 | -28% pp / -55% tg vs CPU |
layer_sweep | gpu_ngl37 | opencl_adreno642l | 37 | 4 | 256 | 64 | 3 | 17.37 | 2.24 | 44-48 | all layers on GPU; -40% pp / -70% tg |
threads | cpu_t2 | cpu | 0 | 2 | 256 | 64 | 2 | 13.60 | 6.21 | 44-48 | 2xA78 |
threads | cpu_t4 | cpu | 0 | 4 | 256 | 64 | 2 | 26.40 | 7.47 | 44-48 | lower bound of the 26.4-28.8 range for -t 4 |
threads | cpu_t6 | cpu | 0 | 6 | 256 | 64 | 2 | 24.30 | 5.65 | 44-48 | mixes in A55 cores |
threads | cpu_t8 | cpu | 0 | 8 | 256 | 64 | 2 | 25.50 | 4.47 | 44-48 | llama-bench default; tg -40% vs -t 4 |
crosscheck | cpu_only_build_t4 | cpu | 0 | 4 | 256 | 64 | 3 | 28.98 | 7.57 | 44-48 | build/ CPU-only binary instead of build-cl |
crosscheck | cpu_only_build_t8 | cpu | 0 | 8 | 256 | 64 | 3 | 29.59 | 5.88 | 44-48 | build/ CPU-only binary |
thermal | cold_max_clocks | cpu | 0 | 4 | 256 | 128 | 3 | 40.47 | 7.53 | 36-41 | scaling_max_freq at spec max 2208000/2131200 |
thermal | hot_throttled | cpu | 0 | 4 | 256 | 64 | 3 | 28.90 | 7.4 | 45-47 | scaling_max_freq cut to 1862400/1651200; pp -29% |
correctness | lmhead_cpu_ngl8 | opencl_adreno642l | 8 | 4 | 16 | 64 | 1 | out_of_scope | 5.4 | null | llama-cli; with lm_head on GPU the same run gave 4.9 t/s |
Snapdragon 778G and 8 Gen 2 (Adreno) — llama.cpp CPU vs OpenCL benchmark
Measured throughput of Qwen2.5-3B-Instruct Q4_K_M in llama.cpp on two Android phones, running in
Termux without root, comparing the pure CPU backend with the ggml-opencl GPU backend:
- OPPO Reno7 5G — Snapdragon 778G, Adreno 642L (2 CU), 8 GB LPDDR4x-4266, Android 13, measured 2026-10-22. Numbers are the original release of this dataset.
- OnePlus 11 — Snapdragon 8 Gen 2 (
SM8550), Adreno 740 (6 CU), 14 GB RAM + 9 GB swap, Android 16, measured 2026-10-24. Same model, same binary layout, same flags.
Result in one line: on both SoCs GPU offload is slower than pure CPU at every layer count
(-ngl 8/14/20/37 on the Reno7, 9/18/27/36 on the OnePlus), so the recommended configuration is
CPU-only, -t 4. The flagship doubles decode throughput (7.45 → 13.81 t/s, i.e. ~15.6 → ~29 GB/s
effective) — but the extra 4 compute units still do not produce a crossover.
Headline numbers
llama-bench -fa off -p 256 -n 64 -t 4, medians of interleaved rounds, SoC 44–48 °C:
| configuration | prompt 256 (t/s) | generation 64 (t/s) | vs CPU |
|---|---|---|---|
CPU, -ngl 0, -t 4 |
28.80 | 7.45 | — |
GPU OpenCL -ngl 8 |
25.51 | 5.25 | pp −11 %, tg −30 % |
GPU OpenCL -ngl 14 |
22.74 | 4.14 | pp −21 %, tg −44 % |
GPU OpenCL -ngl 20 |
20.74 | 3.32 | pp −28 %, tg −55 % |
GPU OpenCL -ngl 37 (all layers) |
17.37 | 2.24 | pp −40 %, tg −70 % |
Thread sweep (CPU): -t 2 13.60/6.21, -t 4 26.4–28.8/7.47, -t 6 24.30/5.65, -t 8 25.50/4.47.
Thermal state dominates prompt processing: cold device (36–41 °C, clocks at spec max)
pp256 = 40.47 ± 0.14 and tg = 7.53 ± 0.08; hot (45–47 °C, scaling_max_freq cut from 2 208 000 to
1 862 400 Hz) pp256 = 28.9 ± 0.1 and tg = 7.4 ± 0.1 — −29 % pp, −2 % tg.
Second device: Snapdragon 8 Gen 2 / Adreno 740 (2026-10-24)
llama-bench -fa off -p 256 -n 64 -t 4, same model file, two interleaved sessions: A started
immediately after the build (hot phone), B after a ~3-minute cooldown. Medians:
| session | configuration | prompt 256 (t/s) | generation 64 (t/s) | vs CPU of the same pair |
|---|---|---|---|---|
| B (cooled, 39.6 → 47.0 °C) | CPU -ngl 0, -t 4 |
45.11 ± 0.74 | 13.81 ± 0.56 | — |
| B (cooled, 47.0 → 49.3 °C) | GPU -ngl 18 (18/36 layers) |
36.97 ± 0.02 | 12.97 ± 0.71 | pp −18 %, tg −6 % |
| B (50.5 → 52.0 °C) | CPU -ngl 0 |
40.85 ± 0.01 | 12.59 ± 0.44 | — |
| B (52.7 → 54.1 °C) | GPU -ngl 18 |
35.99 ± 0.12 | 12.53 ± 0.74 | pp −12 %, tg −0.5 % |
| A (hot, not sampled) | CPU -ngl 0 |
42.05 ± 0.74 | 12.88 ± 0.53 | — |
| A (hot, not sampled) | GPU -ngl 18 |
36.96 ± 0.04 | 12.20 ± 0.80 | pp −12 %, tg −5 % |
| A (hot, not sampled) | CPU -ngl 0 |
36.59 ± 0.00 | 12.03 ± 0.52 | — |
| A (hot, not sampled) | GPU -ngl 18 |
33.61 ± 0.11 | 11.60 ± 0.76 | pp −8 %, tg −4 % |
- Layer sweep (
-r 1, warm reference):-ngl0/9/18/27/36 → pp 42.05 / 41.20 / 37.00 / 34.30 / 31.78 t/s, tg 12.88 / 13.31 / 13.00 / 13.33 / 13.44 t/s. Prompt throughput falls monotonically; generation is flat. There is no layer count at which offload wins. - Sustained load (
-r 10, after cooldown): CPU 44.30 ± 0.95 / 12.52 ± 0.44 in 117 s vs GPU 27.84 ± 0.73 / 9.41 ± 0.10 in 176 s — −37 % pp, −25 % tg, and 50 % more wall time. - Thermals:
scaling_max_freqis cut at ~50–52 °C package / 85–91 °C big-core for both backends, so offload relocates heat rather than removing it. In the sustained GPU run the prime core sat at 864 MHz in 155 of 157 sampled seconds (CPU run: 1.84–2.48 GHz). This is why the short run (−18 % pp) understates the real penalty (−37 %). - Flash attention compiles on this driver (unlike Adreno 642L) but is still a loss with offload:
-ngl 18 -fa on= 41.68 pp / 7.55 tg versus 12.97 tg with-fa off. - Memory: peak RSS 2084 MiB (CPU) vs 1350 MiB (GPU).
- Roofline: 13.81 t/s × 2.105 GB = ~29 GB/s effective decode bandwidth (Reno7: ~15.6 GB/s). No verified spec figure was available for this phone, so no percentage-of-peak is claimed.
- The Adreno 740 driver needs none of the three source patches that the 778G required; the patches
in
scripts/are 778G-specific.
Why the GPU loses
Decode reads 2.094 GB of weights per token, so tg is a DRAM benchmark: 7.45 t/s × 2.094 GB ≈
15.6 GB/s ≈ 91 % of the 17.06 GB/s LPDDR4x-4266 peak. Offloading layers cannot create bandwidth,
and adds cross-backend copies. Adreno 642L exposes only 2 compute units, max_mem_alloc_size
912 MB, and its OpenCL 2.0 driver needs three source patches to run at all (multi-kernel programs
SIGSEGV the vendor compiler; the F16 mul_mv_f16_f32_l4 kernel never builds; flash attention fails
with err=-6), so -fa off is mandatory with -ngl > 0.
Files
Reno7 / Snapdragon 778G (flat copies at the root are what the dataset viewer reads):
results.csv— every measurement in one flat table (section, label, backend, ngl, threads, …)device.json— full hardware and software description (clocks, OpenCL limits, cmake flags, env knobs)bench-inter.log— interleaved CPU/GPU rounds with SoC temperature per round (primary source)bench-threads.log— thread sweepbench-cpu.log— cross-check on a CPU-only build (28.98/7.57 at-t 4, within 1 %)bench-gpu.log— full GPU sweep including kernel failures and warnings
OnePlus 11 / Snapdragon 8 Gen 2:
results-onplus-sm8550.csv— all runs: 2 interleaved sessions, layer sweep, sustained-r 10, probesdevice-onplus-sm8550.json— hardware/software description and headline numberslogs/bench-run.log— session A (hot): interleaved CPU/GPU roundslogs/bench-cold.log— session B (cooled): interleaved rounds withzone0andcpu7maxper roundlogs/probe-{cpu,gpu}.log— shortpp32/tg8probes with peak RSSdata/thermal-onplus-sm8550-{cpu,gpu}.csv— 1 Hz telemetry for the sustained runs (t_s, zone0_c, cpu_little_c, cpu_big_c, cpuss_c, gpu_c, batt_c, cpu7_max_khz, cpu7_cur_khz, cpu3_max_khz, cpu3_cur_khz)data/thermal-onplus-sm8550-{cpu,gpu}-probe.csv— same sampler for the short probesdata/results.csv,data/results-onplus-sm8550.csv— identical to the root copies (repo layout)
Shared:
docs/cpu-vs-gpu.md— full Reno7 report;docs/oneplus-sm8550-cpu-vs-gpu.md— full OnePlus reportdocs/bringup-gotchas.md,docs/gpu-test-howto.md— build/run runbook and test procedurellms.txt— machine-readable synopsis;CITATION.cff— how to citescripts/— OpenCL build script, test harness and the three 778G driver patches
How to reproduce
# CPU baseline
llama-bench -m qwen2.5-3b-instruct-q4_k_m.gguf -ngl 0 -fa off -p 256 -n 64 -r 3 -t 4
# GPU, with the knobs required for correct output on Adreno
GGML_OPENCL_Q6K_GEMV_O4=1 GGML_OPENCL_Q6K_GEMV_O4_GLOBAL=0 GGML_OPENCL_LMHEAD_CPU=1 \
llama-bench -m qwen2.5-3b-instruct-q4_k_m.gguf -ngl 8 -fa off -p 256 -n 64 -r 3 -t 4
llama-bench defaults are traps: -ngl -1 (auto-offload) and -t 8.
Caveats
Two phones, one model, two llama.cpp revisions (19ab5a5 on the Reno7, 6b9ba4f on the OnePlus), two
driver builds. The numbers describe Adreno 642L + LPDDR4x + vendor OpenCL 2.0 on Android 13 and
Adreno 740 + LPDDR5X + vendor OpenCL 3.0 on Android 16, not "Android GPUs" in general. Absolute
throughput is stock-thermal-config: the kernel caps scaling_max_freq far below the nominal values, and
the caps are neither monotone nor under user control without root.
The qualitative rule still transfers: check tg × weights_per_token against the spec bandwidth before
optimising a backend; if the CPU is above ~85 % of peak, there is nothing to win. Going from 2 to 6 GPU
compute units and from LPDDR4x to LPDDR5X did not move the crossover point, so "wait for a better GPU"
is not a strategy on unified-memory phones.
Links
- Code, patches and full runbook: github.com/vovaxa55/snapdragon778g-llama-cpp-opencl-bench
- Machine-readable synopsis for LLM ingestion:
llms.txt - Second-device report:
docs/oneplus-sm8550-cpu-vs-gpu.md
Licence
Data and text: CC BY 4.0. Source code (patches, scripts): MIT.
- Downloads last month
- 27