-
Notifications
You must be signed in to change notification settings - Fork 62
Add FFT support via AbstractFFTs interface #713
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
Open
KaanKesginLW
wants to merge
43
commits into
JuliaGPU:main
Choose a base branch
from
KaanKesginLW:feature/fft-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
56c04e3
Add FFT support via AbstractFFTs interface
KaanKesginLW eba619c
Add real FFT support (rfft, irfft, brfft)
KaanKesginLW ea12750
Add ComplexF16/Float16 support and improve type documentation
KaanKesginLW af8635e
Add 1D FFT tests
KaanKesginLW 00e6022
Add in-place FFT variants (fft!, ifft!, bfft!)
KaanKesginLW 1d52619
Apply Runic formatting to FFT implementation
KaanKesginLW e5348f7
Add missing mul! import in FFT tests
KaanKesginLW 1fc6fd1
Add fused fftshift support for FFT operations
KaanKesginLW 7b6f1d6
Simplify fused fftshift API: extend AbstractFFTs.fft directly
KaanKesginLW 6ca2a8d
Refactor FFT: move @objc wrappers to operations.jl
KaanKesginLW 37f811a
Simplify FFT: remove fused fftshift feature
KaanKesginLW 9dca771
Restructure FFT tests following CUDA.jl pattern
KaanKesginLW 681ba2b
Apply Runic formatting to FFT tests
KaanKesginLW eab6b22
Address review feedback: remove .gitignore change, restore original f…
KaanKesginLW 537b337
Remove hallucinated kwargs
christiangnrd 7f3a1a1
Add more CUDA tests
christiangnrd bb402e4
Temp disable some new tests
christiangnrd 9aa1dac
[NFC] Reorganize code
christiangnrd 8de6db7
[NFC] Cleanup
christiangnrd 6bd2d45
Rename to `MPSGraphFFTDescriptor`
christiangnrd 23d9d3a
assert_applicable
christiangnrd 98764ca
Add inplace stuff
christiangnrd b6e17ec
Merge MtfFFTPlan and MtlFFTInplacePlan
christiangnrd de5f6c2
Move some code around
christiangnrd c4ac247
Remove unecessary helper function
christiangnrd 43ad756
Add output type parameter
christiangnrd 18e287e
Big merge
christiangnrd d8a6b63
Fix show
christiangnrd bc19414
Metaprogram ALL the things
christiangnrd ea9d35f
Minor refactor
christiangnrd 3fb0241
Bring implementation more in line with the AbstractFFTs interface
christiangnrd e2addbc
Add some missing CUDA stuff
christiangnrd c32ee3e
autoreleasepool tweaks
christiangnrd 7c58133
More validation + fixup tests
christiangnrd bf39b14
Rename stuff for consistency with CUDA fft test
christiangnrd db8abf2
Integer FFTs
christiangnrd 2338fe9
Remove unused MPSGraph operations
christiangnrd 9ed8793
Cleanup
christiangnrd be7ae48
Comment cleanup
christiangnrd 7a87dd3
Cache plans
christiangnrd 7a6fa34
Copilot suggestion
christiangnrd 4848aff
Fix potentially unsafe cache access
christiangnrd d63bf16
Address feedback
christiangnrd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,5 +48,6 @@ include("operations.jl") | |
| include("random.jl") | ||
|
|
||
| include("matmul.jl") | ||
| include("fft.jl") | ||
|
|
||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
|
|
||
| ## FFT Descriptor Creation | ||
|
|
||
| """ | ||
| MPSGraphFFTDescriptor(; inverse=false, scalingMode=MPSGraphFFTScalingModeNone) | ||
|
|
||
| Create an MPSGraphFFTDescriptor with the specified parameters. | ||
| """ | ||
| function MPSGraphFFTDescriptor(; inverse::Bool = false, scalingMode::MPSGraphFFTScalingMode = MPSGraphFFTScalingModeNone) | ||
| obj = @objc [MPSGraphFFTDescriptor alloc]::id{MPSGraphFFTDescriptor} | ||
| desc = MPSGraphFFTDescriptor(obj) | ||
| desc.inverse = inverse | ||
| desc.scalingMode = scalingMode | ||
| return desc | ||
| end | ||
|
|
||
| ## MPSGraph FFT operations | ||
| function fastFourierTransformWithTensor(graph::MPSGraph, tensor::MPSGraphTensor, axes::NSArray, descriptor::MPSGraphFFTDescriptor, name = "fft") | ||
| obj = @objc [graph::id{MPSGraph} fastFourierTransformWithTensor:tensor::id{MPSGraphTensor} | ||
| axes:axes::id{NSArray} | ||
| descriptor:descriptor::id{MPSGraphFFTDescriptor} | ||
| name:name::id{NSString}]::id{MPSGraphTensor} | ||
| MPSGraphTensor(obj) | ||
| end | ||
|
|
||
| function realToHermiteanFFTWithTensor(graph::MPSGraph, tensor::MPSGraphTensor, axes::NSArray, descriptor::MPSGraphFFTDescriptor, name = "rfft") | ||
| obj = @objc [graph::id{MPSGraph} realToHermiteanFFTWithTensor:tensor::id{MPSGraphTensor} | ||
| axes:axes::id{NSArray} | ||
| descriptor:descriptor::id{MPSGraphFFTDescriptor} | ||
| name:name::id{NSString}]::id{MPSGraphTensor} | ||
| MPSGraphTensor(obj) | ||
| end | ||
|
|
||
| function HermiteanToRealFFTWithTensor(graph::MPSGraph, tensor::MPSGraphTensor, axes::NSArray, descriptor::MPSGraphFFTDescriptor, name = "irfft") | ||
| obj = @objc [graph::id{MPSGraph} HermiteanToRealFFTWithTensor:tensor::id{MPSGraphTensor} | ||
| axes:axes::id{NSArray} | ||
| descriptor:descriptor::id{MPSGraphFFTDescriptor} | ||
| name:name::id{NSString}]::id{MPSGraphTensor} | ||
| MPSGraphTensor(obj) | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
new, oralloc+init?