Skip to content

Integrate VulkanMemoryAllocator #443

Description

@softcookiepp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions