]> git.djapps.eu Git - pkg/ggml/sources/whisper.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)
committerGeorgi Gerganov <redacted>
Wed, 28 Aug 2024 10:22:20 +0000 (13:22 +0300)
commit488a966c07013bdfc80f0210d8cd8f233b3a25f9
tree751dee71fdc755ead3a4ddf0237bfaeb79742554
parent8954769aa2b25059fef2dfd235a4aded128c7824
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>
ggml/src/ggml-vulkan.cpp