KomputeProject / kompute

General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.
http://kompute.cc/
Apache License 2.0
2k stars 154 forks source link

Support multiple types of vk Buffer types like uniform, etc (beyond storage buffer) #5

Open axsaucedo opened 4 years ago

axsaucedo commented 4 years ago

Currently the storage buffer is the only one supported, it will be important to add an extra capability for buffers of types beyond storage buffer. This will have to be an initial research to identify which types to prioritise and why.

axsaucedo commented 4 years ago

Currently there are several types that can be added includign UBOs, and image buffers as per #4, it will be important to find specific areas where UBOs would be more efficient, as this will be required on how it also fits the Tensor -> Params -> Algorithm components https://www.reddit.com/r/vulkan/comments/4uayoo/why_should_i_use_a_uniform_buffer_if_i_can_have_a/

axsaucedo commented 4 years ago

From documentation it seems there are clear adv/disadvantages when using UBOs vs SSBOs, primarily that SSBOs can be much larger, whilst UBOs can be faster. This means it will be important to explore adding this as a simple extension to users to define the type of memory binding. https://www.khronos.org/opengl/wiki/Shader_Storage_Buffer_Object

MiroPalmu commented 2 years ago

How should we implement different API for different vk Buffer types?

My proposal would be to have different kp TensorTypes. For example TensorType::eUniformBuffer etc.