Radix-5 and radix-7 kernels for powers of 5 and 7 - #6
Open
pankgeorg wants to merge 3 commits into
Open
Conversation
Symmetric odd-length DFT (cosine and sine sums over x_j ± x_{N-j}) with
folded constants, (N-1)^2 real multiplications instead of 4(N-1)^2 from a
twiddle table. Real input is accepted. Composite sizes with factors 5/7:
1000 35 -> 19 us, 46305 3.3 -> 1.9 ms, 10^6 100 -> 68 ms (ComplexF64).
Same structure as the radix-3 kernel, with the 5-/7-point codelets as in-place butterflies; replaces the composite step + O(n^2) leaves for 5^k and 7^k (Float32/Float64). 125-point 1.8 -> 1.2 us, 1000 19 -> 14 us, 10^6 68 -> 55 ms (ComplexF64).
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.
Stacked on #4 (the diff includes the odd codelets).
POW5_FFT/POW7_FFTnodes andfft_powr!: same structure as the radix-3 kernel with the 5-/7-point codelets as in-place butterflies (powr_twiddleslaid out likepow3_twiddles); replaces the composite step + O(n²) leaves for 5^k and 7^k (Float32/Float64 only; other types keep the composite path).compare3 vs
integration/all, aarch64, 1 thread, 505 cases (with #4): 1.09× geomean; smooth class 1.40× ComplexF64 / 1.70× ComplexF32 / 1.34–1.58× rfft — n=1000 35→14 µs (FFTW 10), 10^6 100→55 ms (FFTW ESTIMATE 50), 441000 42→22 ms; over #4 alone: 125-point 1.8→1.2 µs, n=1000 20→14 µs. The sub-0.95× cells of the first run were noise (quiet back-to-back N-d/batched re-run: ≤2 of 117 cells below 0.95×, min 0.91×,benchmark/compare3/aarch64/recheck-nd-batched/). Table:benchmark/compare3/aarch64/radix57/COMPARE3.mdonbench/compare3.Tested: full suite green on 4 threads.
x86-64 (companion session,
benchmark/x86-64/compare3/r57/): 1.11× geomean vs integration/all but 1.00× vs #4 alone (every class 0.91–1.08×): on AVX2 the whole smooth-class gain is already delivered by the codelets. On aarch64 the kernels do compound: n=1000 19.9 → 14.4 µs, 125-point 1.8 → 1.2 µs, 10^6 66 → 55 ms over #4.