]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
vulkan: Optimize binary ops (#10270)
authorJeff Bolz <redacted>
Thu, 14 Nov 2024 05:22:55 +0000 (23:22 -0600)
committerGitHub <redacted>
Thu, 14 Nov 2024 05:22:55 +0000 (06:22 +0100)
commitaf148c9386da825a60c7038549c121c35ca56b50
treef804fa11349313749ca0afea9144e2bb391b4f45
parent66798e42fbe636f1cb6236e4bc30939d23ef7c25
vulkan: Optimize binary ops (#10270)

Reuse the index calculations across all of src0/src1/dst. Add a shader
variant for when src0/src1 are the same dimensions and additional modulus
for src1 aren't needed. Div/mod are slow, so add "fast" div/mod that
have a fast path when the calculation isn't needed or can be done more
cheaply.
ggml/src/ggml-vulkan.cpp
ggml/src/vulkan-shaders/acc.comp
ggml/src/vulkan-shaders/add.comp
ggml/src/vulkan-shaders/concat.comp
ggml/src/vulkan-shaders/div.comp
ggml/src/vulkan-shaders/generic_binary_head.comp
ggml/src/vulkan-shaders/get_rows.comp
ggml/src/vulkan-shaders/get_rows_quant.comp
ggml/src/vulkan-shaders/mul.comp