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

Add support for CuFFT callback functions #614

Closed
david-macmahon opened this issue Dec 30, 2020 · 1 comment
Closed

Add support for CuFFT callback functions #614

david-macmahon opened this issue Dec 30, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@david-macmahon
Copy link
Contributor

CuFFT supports callback functions (which must be device functions) so the user can hook into the loading and storing of data points to perform customization or other functionality. The cufftXtSetCallback() function is called to "register" user callback functions with CuFFT, but it is not exposed by CUDA.jl. It would be fairly easy to wrap this (and related) CuFFT function(s), but it's not clear how one could create the callback device functions and get the pointers to them. Maybe via CUDA.dynamic_cufunction?

Some examples of CuFFT callback function use cases:

  1. Perform on-the-fly conversion from 8 bit integers to 32 bit floats (since CuFFT does not support 8 bit integer input data) thereby reducing the memory footprint when dealing with 8 bit input data.
  2. Compute and store/integrate the abs2 (and, for spectral kurtosis, the abs2^2) of the CuFFT output samples as they are being stored, thereby reducing memory bandwidth (as compared to re-reading the CuFFT output buffer to compute them after the FFT is complete).
@david-macmahon david-macmahon added the enhancement New feature or request label Dec 30, 2020
@maleadt
Copy link
Member

maleadt commented Jan 5, 2021

Dup of #75. I haven't seriously looked at it since then. How important of a feature is this?

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

No branches or pull requests

2 participants