]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
vulkan: change gated_delta_net to shard a column across a subgroup (llama/20662)
authorJeff Bolz <redacted>
Fri, 20 Mar 2026 11:17:15 +0000 (06:17 -0500)
committerGeorgi Gerganov <redacted>
Sat, 28 Mar 2026 11:39:09 +0000 (13:39 +0200)
commitbb9309adc4cbef6733cd004469ccd8966b22bfd1
treec27b5acb051e3e22a11621a0980c46d371804d32
parenta4e7b4adfdb6dfcf426e00d67591033ea5830b6e
vulkan: change gated_delta_net to shard a column across a subgroup (llama/20662)

* vulkan: change gated_delta_net to shard a column across a subgroup

This is based on https://github.com/ggml-org/llama.cpp/pull/20391, I used an
LLM to port the CUDA code to Vulkan, and guided to it to make various fixes to
work with Vulkan (e.g. handling different subgroup sizes, unknown mapping of
subgroup to invocation id, using subgroupAdd optionally, etc.).

This fixes a perf regression from the transposing of the values in memory
(!20443).

* vulkan: Spread columns across fewer lanes to reduce the number of workgroups
src/ggml-vulkan/ggml-vulkan.cpp
src/ggml-vulkan/vulkan-shaders/gated_delta_net.comp
src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp