kompute icon indicating copy to clipboard operation
kompute copied to clipboard

Identify and introduce speed optimizations for Kompute

Open axsaucedo opened this issue 3 years ago • 2 comments

Now that most of the core vulkan featues are covered, a key priority will include identifying and adding optimizations in the performance of the interface. This of course would involve ensuring there are no bottlenecks that can hinder the performance of the underlying GPU code, but the more important and nuanced issues will be to ensure that external applications using Kompute are able to introduce relevant lower level optimizations.

axsaucedo avatar Mar 03 '21 22:03 axsaucedo

An initial exploration was to perform an assessment of potential optimization improvements that could improve the performance of higher level applications like vkjax, and delve into whether there could be performance gains by implementing an OpAgoFactory class which can provide one (or several) of the following features:

  • Provide out of the box shader operations
  • Provide a set of methods that simplify the compilation of shaders
  • Provide a way to cache the storage of shaders (potentially on spv files in local filestore - eg home dir)

Current exploration via #173

axsaucedo avatar Mar 03 '21 22:03 axsaucedo

Hey people, I'm working on a similar project. While researching descriptor set layouts etc. I found this tutorial which I think has a lot of information that I think can be very useful for this issue:

  • https://vkguide.dev/docs/chapter-4/storage_buffers/
  • https://vkguide.dev/docs/extra-chapter/abstracting_descriptors/

And there may be some other pages on this site which may be interesting too. I'm still reading through them myself.

My main takeaway I got from this is that a lot of things can be cached/reused across ops. Not only the shaders, but also descriptorSetLayouts, pipelines and probably other pieces as well. I think it would be a good idea to have central caches that ops or factories can get all their parts from. Similarly, pools on the GPU should also be managed centrally. I think that this is similar to what game engines do.

I hope this helps you in some way. :)

MarkKremer avatar Apr 03 '21 15:04 MarkKremer