-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-kernel influence in binding allocation #614
Comments
If the sample was rewritten as:
Clspv would reuse binding 0 for by k0 and k1 There are improvements in this regard. For example, DirectResourceAccess attempts to leverage reused bindings to avoid variable pointers. It should be the other way around and AllocateDescriptors should consider which resources can be shared before assigning bindings (a sort of graph colouring problem). Any change here though would necessitate changes in the SPIR-V producer to generate variables differently. This isn't necessarily difficult, but it is not currently accounted for. |
I see, makes sense. Thank you for the explanation. I'm amazed I'm only bumping into this now! I'll push a fix to clvk. |
@kpet, Can we close this issue now? |
Maybe @alan-baker wants to keep it to track his suggested improvements. Maybe a new issue would be better. I'm fine with closing it if Alan's fine. |
I've filed #1061. |
Clvk currently assumes that the highest binding number in a descriptor set is less than the number of resources that require a binding. This no longer seems to be true with recent versions of clspv (kpet/clvk#233). While accomodating this in clvk is trivial, I wanted to double check that this bit of clspv behaviour was expected before doing so. Specifically, it seems that in some cases bindings for one kernel are allocated after those for another kernel. Consider the following code:
which leads to the following descriptor map:
Generally, this seems to happen when there are POD and local arguments. I haven't looked into the details.
Is this expected behaviour? If yes, what is the rationale for this behaviour?
The text was updated successfully, but these errors were encountered: