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

Use vkFFT for FFT support #270

Open
AshtonSBradley opened this issue Dec 10, 2023 · 4 comments
Open

Use vkFFT for FFT support #270

AshtonSBradley opened this issue Dec 10, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed libraries Things about libraries and how we use them.

Comments

@AshtonSBradley
Copy link

FFT support is absent from Metal.jl right now.

A state of the art and fully feature fft library has been developed for Vulcan that has a Metal backed.

https://github.com/DTolm/VkFFT

Would it be possible to wrap it from Metal.jl?

@maleadt
Copy link
Member

maleadt commented Dec 11, 2023

Sure, that's very possible. It's not high up my list of priorities though, so feel free to take a stab at it. It would require packaging vkFFT on Yggdrasil, probably using separate packages for each of the back-ends, and using that from here in Metal.jl.

@maleadt maleadt changed the title wrap vkFFT? Use vkFFT for FFT support Dec 11, 2023
@max-Hawkins
Copy link
Contributor

This would be awesome!

@maleadt maleadt added enhancement New feature or request help wanted Extra attention is needed libraries Things about libraries and how we use them. labels Feb 28, 2024
@rveltz
Copy link

rveltz commented Jun 27, 2024

It seems they wrapped FFT in torch

pytorch/pytorch#119670

In [1]: import torch
   ...: x = torch.randn(1, 16000, device="mps")

In [2]: x
Out[2]: x

tensor([[-0.2197, -1.0679,  0.9474,  ..., -0.9471,  0.4943,  0.0663]],
       device='mps:0')

In [3]: x
Out[3]: 
tensor([[-0.2197, -1.0679,  0.9474,  ..., -0.9471,  0.4943,  0.0663]],
       device='mps:0')

In [4]: torch.fft.rfft(x)
Out[4]: 
tensor([[-153.5669+0.0000e+00j, -122.9657+7.1824e+01j,   19.3239-4.1716e+01j,
          ...,  -62.0741-5.7114e+01j,   37.2413-6.5813e+01j,
          -76.1166+1.1871e-05j]], device='mps:0')

@rveltz
Copy link

rveltz commented Sep 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed libraries Things about libraries and how we use them.
Projects
None yet
Development

No branches or pull requests

4 participants