Skip to content

opencl: tiled mul_mat with local memory for f16 and f32 #14809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lhez
Copy link
Collaborator

@lhez lhez commented Jul 22, 2025

This PR adds another variant of tiled matmul for f32 and f16. They also use local memory for tiling and pretty much follow the standard pattern. The main difference from #14535 is that tiles from both src0 and src1 are transposed.

On Adreno 830,

master

model size params backend ngl test t/s
qwen2 1.5B F16 2.88 GiB 1.54 B OpenCL 99 pp512 145.45 ± 2.56
qwen2 1.5B F16 2.88 GiB 1.54 B OpenCL 99 tg128 17.68 ± 0.14

this PR

model size params backend ngl test t/s
qwen2 1.5B F16 2.88 GiB 1.54 B OpenCL 99 pp512 174.30 ± 10.32
qwen2 1.5B F16 2.88 GiB 1.54 B OpenCL 99 tg128 17.73 ± 0.12

@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 Jul 22, 2025
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.

1 participant