-
Notifications
You must be signed in to change notification settings - Fork 49
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
Short-Time Fourier Transform support? #140
Comments
To me that feels more like something that belongs in separate library. How about https://crates.io/crates/ruststft ? |
I made this to match PyTorch's output. https://github.com/phudtran/rustft
|
Nice! To speed it up you should create a single planner and reuse that for every FFT call. The way it works now, where it creates a new planner every time, means that it spends more time creating the planner and the FFT instance than performing the actual transform. |
Thank you for the suggestion! I'm reusing both the planner and windows, but both forward and inverse are still very slow compared to PyTorch (especially inverse). Any idea how can improve it further? |
I don't see how the planner gets reused between FFT calls, here is looks like it creates a new one on each call: https://github.com/phudtran/rustft/blob/7bdcf44d191302f022c1a7553a7180d90e12af54/benchmarks/src/lib.rs#L49 I would start a little simpler by implementing some benchmarks in rust first. At the moment it's not clear what step (or steps) in a processing call is responsible for the slowness. |
Yeah unfortunately I can't pass in a planner from Python, so the Python benchmarks have not been updated. I'll time the function in rust instead after the planner is created and return that along with the result. |
Not sure if this is completely true, but consider using easyfft that manages the planner for you. |
Would it be possible to get STFT / iSTFT support?
The text was updated successfully, but these errors were encountered: