Skip to content
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

Improve user's tempBuffer allocation workflow #178

Open
davebayer opened this issue Jun 16, 2024 · 3 comments
Open

Improve user's tempBuffer allocation workflow #178

davebayer opened this issue Jun 16, 2024 · 3 comments

Comments

@davebayer
Copy link

Hi,

as I understand it, right now VkFFT supports two ways of allocating tempBuffer:

  1. auto allocation - the user does not set the userTempBuffer flag, does not supply both the tempBufferSize and tempBuffer arrays, everything is managed by the plan
  2. user allocation - the user sets the userTempBuffer flag, passes the temp buffer sizes via tempBufferSize (config) and the temp buffers tempBuffer (config or launch) in arrays of size tempBufferNum.

I think it would be a nice feature to allow the user to do his own allocation, while supplying the required temporary buffer count and sizes. I would suggest to add a third way:

  • user allocation v2 - the user sets the userTempBuffer flag, the planner will fill the temp buffer sizes in tempBufferSize array of size tempBufferNum managed by the plan (as in auto allocation) . Then the user can read the sizes from app->configuration->tempBufferSize, do the allocation and pass the temp buffers via the launch configuration.

The main advantage of this approach is that the user needn't to calculate the proper buffer sizes and counts himself. This behaviour is more similar to what other libraries offer.

What do you think about it?

Thanks.

David

@DTolm
Copy link
Owner

DTolm commented Jun 18, 2024

Hello,

as far as I know, no one has reported using the manual tempBuffer submission before you (which is why none of the vendor libraries even try doing it), but this suggestion is reasonable and not hard to implement, I will add it soon. Thank you!

Best regards,
Dmitrii

@davebayer
Copy link
Author

Great! Actually all of the GPU FFT libraries I know about allow user's tembuffer allocation, they just call it a workspace or work area. For example here is the link to cuFFT work area API.

David

@DTolm
Copy link
Owner

DTolm commented Jun 19, 2024

Ah, ok, guess I somehow missed that.

Best regards,
Dmitrii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants