]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Optimize Vulkan backend for better CPU performance and less GPU synchronization overh...
authorMarkus Tavenrath <redacted>
Sun, 11 Aug 2024 08:09:09 +0000 (10:09 +0200)
committerGitHub <redacted>
Sun, 11 Aug 2024 08:09:09 +0000 (10:09 +0200)
commit7c5bfd57f83fd3630934cfa70892aa4022d3faf7
tree2c3e01b2cba0d7ccba908e457703300f5ce7e1d4
parent6e02327e8b7837358e0406bf90a4632e18e27846
Optimize Vulkan backend for better CPU performance and less GPU synchronization overhead. (#8943)

* Optimize Vulkan backend for better CPU performance and less GPU synchronization overhead.

- Allocation overhead for the temporary std::vectors was easily detectable with a sampling profiler and simple to remove.
- ggml_vk_sync_buffer introduce a full pipeline sync which has a significant cost on the GPU side, sometimes larger than the actual kernel execution. Adding only barriers for shader read/writes and transfers seems to be sufficient looking at the code which either launches compute kernels or copies tensors.

* Fix small typo

---------

Co-authored-by: 0cc4m <redacted>
ggml/src/ggml-vulkan.cpp