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
1.94k stars 146 forks source link

Added an option to get the current vk instance #292

Closed COM8 closed 2 years ago

COM8 commented 2 years ago

In order to debug compute shaders using RenderDoc and its in application API, one needs access to the vk::Instance object held by the kp::Manager. This PR introduces a new getter for retrieving the std::shared_ptr<vk::Instance> via the Manager::getVkInstance()call.

axsaucedo commented 2 years ago

Nice one @COM8 - u was actually thinking of doing a codebase refractor that ensures "open by default" and exposes all underlying vulkan components and likewise allows to use external Vulkan components - one request that has come up in the past is to initialise vkbuffers with external tensors. Will open an issue for this.

PR looks good - seems you need to sign commits and we'll be able to merge

COM8 commented 2 years ago

Yes, this is something I was thinking about as well since it would allow one to extend the functionality of kompute by accessing raw Vulkan objects if needed and if there is no alternative available in kompute.

Looks like pulling the docker image failed for the cpp-tests.

axsaucedo commented 2 years ago

OK sounds like something that's something worth exploring - I'll put together a design doc and thsi can be something interesting to do iteratively once your current pr is merged

Strange, seems it now worked with the rerun - merging