]> git.djapps.eu Git - pkg/ggml/sources/ggml/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)
committerGeorgi Gerganov <redacted>
Tue, 27 Aug 2024 19:01:14 +0000 (22:01 +0300)
commitded3f252a5c6a87d71e7abb2ebb3b0a612e56ee3
treee284a9fdde8dcb353167842e91b372a912e723d9
parent06fe976764b5cce6c4f0d25997af4fdf88a2d813
Optimize Vulkan backend for better CPU performance and less GPU synchronization overhead. (llama/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>
src/ggml-vulkan.cpp