Comments (3)
Hm, the VK_KHR_push_descriptor seems not to be the core extension yet and not supported on some platforms. Wouldn't one of the following solutions be better:
-Recreate the descriptor set on every VkFFTAppend call if isInputFormatted (or other type of runtime buffer selection) is selected.
-Allocate multiple descriptor sets (number selected by user) and cycle through them at every append call.
from vkfft.
-
Not possible. Once the descriptor is bound in a command buffer, you're not allowed to modify or destroy it until the command buffer finishes execution. Avoiding this limitation is the whole point of VK_KHR_push_descriptor.
-
Possibly doable but resource intensive. And I'm not sure if a single compute pipeline is allowed to have multiple descriptor sets bound in the same command buffer (never tried).
In my application I'm using this as part of a larger code path that FFT's two input signals, does a bunch of channel emulation and de-embedding operations in the frequency domain, then IFFT's both of them. This entire optimized code path runs in a single command buffer and already relies on VK_KHR_push_descriptor support in order to allow changing buffers for the de-embedding shader within the command buffer. If it's not available I'd need to do a separate command buffer submission and block after each shader invocation anyway.
My recommendation is just to provide a flag you can set in the plan (or automatically enable if you detect VK_KHR_push_descriptor at plan creation time) that uses push descriptors instead of static binding. The user can then check for VK_KHR_push_descriptor support and, if available, elect to call multiple vkfftAppend calls in one command buffer; if not available then it's on them to not use any given plan a second time before the first use has finished.
You can see some example of how I do this in my code here:
https://github.com/ngscopeclient/scopehal/blob/master/scopehal/ComputePipeline.h?ts=4#L65
https://github.com/ngscopeclient/scopehal/blob/master/scopehal/ComputePipeline.h?ts=4#L178
https://github.com/ngscopeclient/scopehal/blob/master/scopehal/ComputePipeline.h?ts=4#L189
https://github.com/ngscopeclient/scopehal/blob/master/scopehal/ComputePipeline.h?ts=4#L230
from vkfft.
I was mostly referring to this answer as to why explore alternative options: https://community.amd.com/t5/opengl-vulkan/vulkan-vk-khr-push-descriptor-extension-on-windows/td-p/509394
I have enabled push descriptors according to your recommendations. There is still a validation warning that "vkCreateDevice: pCreateInfo->pNext chain includes a structure with unexpected VkStructureType VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR", which I need to look into. Otherwise, the issue with incorrect descriptor sets update now doesn't trigger the validation layer compared to before and results seem to be correct. Thank you for pointing this out, if something doesn't work I will be happy to fix it.
from vkfft.
Related Issues (20)
- Large errors using Intel OpenCL for CPUs HOT 8
- Allow complex transforms to use non-interleaved memory layouts (separate I and Q buffers) HOT 3
- Segmentation fault with 1.3.3 HOT 2
- Merge DCT and DST into DTT HOT 4
- [1.3.4] #include glslang_c_interface.h -> glslang/Include/glslang_c_interface.h HOT 1
- [1.3.4] Could you detect and use the system glslang via cmake HOT 1
- initializeVkFFT throws an exception for small-size convolutions HOT 3
- Multiple systems - one kernel - multiple outputs convolution HOT 10
- in order to use VkFFT, my machine must have a Vulkan driver installed ? HOT 1
- how to dump the generated source kernel? HOT 6
- CUDA&HIP stream asynchronicity HOT 2
- Use enum for precision HOT 2
- Error module and new error handling HOT 2
- Allow HIP to be used with NVIDIA GPUs HOT 1
- [Metal] red herring
- Suggestion: add CITATION.cff HOT 1
- device function performing FFT/DCT of data in shared memory (feature request / feasability) HOT 1
- Creating Multiple VkFFTApplication plans HOT 4
- Orthogonal normalization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vkfft.