FFT: add interleaved F32/C32 APIs#7
Merged
Conversation
11 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
FftErrorvalidation[re0, im0, re1, im1, ...]while retaining split shared-memory, four-step, and packed-real scratch internallyNone/ByN/Orthonormalization, caller-owned launches, and allocating convenience APIsBehavior and safety
Public interleaved entry points return
Result<_, FftError>. They validate dtype, shape, axis, sizes, offsets, writable layout, and input/output aliasing before the first launch or scratch allocation. Normalization is fused into terminal stores. There is no standalone interleaved conversion or scaling kernel; large real transforms retain their packed-real algorithm stages.The existing split APIs and their normalization behavior are unchanged.
Verification
Run locally on an Apple host:
cargo fmt --all -- --checkcargo clippy -p cubek-fft --all-targets --features heavy,benchmarks -- -D warningscargo test -p cubek-fft— 2 unit + 47 integration passedcargo test -p cubek-fft --features heavy— 2 unit + 77 integration passedcargo test -p cubek-fft --features benchmarks --test lib bench_catalog -- --nocapture— 11 passedcargo test -p cubek-fft --features cubecl/wgpu— 2 unit + 47 integration passedcargo test -p cubek-fft --features benchmarks— 8 unit + 58 integration passedcargo check -p benchmarks --benchesgit diff --check origin/main...HEADThe WGPU suite passed on macOS; the test harness did not print an explicit Metal adapter identifier.
Follow-up
F64/C64 remains a follow-up because Metal does not provide native F64 execution.
Refs #6