-
Notifications
You must be signed in to change notification settings - Fork 181
Description
GPU buffer allocation does not come without overhead.
Under the hood, other GPGPU frameworks (OpenCL, CUDA, etc.) have more sophisticated allocation strategies for their memory that mostly involve allocating larger blocks, then suballocating them to the user-visible buffers.
Vulkan does not do this in order to keep the interface between the driver and the Vulkan API as minimal as possible.
Kompute currently does not take this into account, and thus buffer allocations and deallocations in Kompute are going to be far slower than those of other APIs.
To solve this problem, I propose that we integrate VulkanMemoryAllocator, a header-only memory allocation library, into Kompute in order to speed up memory allocation: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
I have had some experience working with this library, and using it in place of naive one-to-one buffer: memory pairing drastically improves benchmarks involving repeated buffer allocation and deallocation.