-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Vulkan] LLM decode ~12% slower than XNNPACK on Adreno #22968
Copy link
Copy link
Open
Labels
module: vulkanIssues related to the Vulkan delegate and code under backends/vulkan/Issues related to the Vulkan delegate and code under backends/vulkan/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
Activity
Metadata
Metadata
Assignees
Labels
module: vulkanIssues related to the Vulkan delegate and code under backends/vulkan/Issues related to the Vulkan delegate and code under backends/vulkan/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Vulkan LLM decode is ~11-13% slower than XNNPACK on Adreno 840 (Galaxy S26 Ultra), while prefill is ~2x faster. Qwen3,
llama_main, cold-device medians, arms interleaved.At 0.6B, decode reads 335 MB of weights per token. The q4gsw GEMV is ~74% of GPU time at ~44.5 GB/s, and the GPU is ~100% busy.
#22941 (fused QK+softmax on the SDPA decode path) is the one change that helped: +2.5-3.9% decode.
Tried, no gain:
linear_dq8ca_q4gsw): 22% slower than 4wPossible directions: cut the non-GEMV work (SDPA ~12%, rms_norm ~5%, no-op view copies ~5%), or a sub-4-bit linear kernel paired with a quantizer that holds accuracy.
cc @SS-JIA @manuelcandales @digantdesai @cbilgin