DTolm / VkFFT

Vulkan/CUDA/HIP/OpenCL/Level Zero/Metal Fast Fourier Transform library
MIT License
1.52k stars 91 forks source link

Vulkan backend: use pipeline caching #85

Closed azonenberg closed 2 years ago

azonenberg commented 2 years ago

Doing some profiling, and skimming the header file, it appears that you always pass VK_NULL_HANDLE to vkCreateComputePipelines. This results in slow performance when initializing the Vulkan backend (you're caching the generated SPIR-V bytecode in saveApplicationString, but not the GPU-native binary generated within the Vulkan driver).

Please allow users to supply a VkPipelineCache during initialization, so that the native binaries can be reused.

DTolm commented 2 years ago

Hello,

I have added an option to provide a pointer to VkPipelineCache, which will then be passed to vkCreateComputePipelines calls.

Best regards, Dmitrii