[fft] Exploit bivariate padding structure in transforms - #88
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
[fft] Exploit bivariate padding structure in transforms#88devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration
Bot
force-pushed
the
devin/1786977962-fused-graeffe
branch
from
August 17, 2026 16:47
c6d77ef to
095004b
Compare
Co-Authored-By: Andrew He <he.andrew.mail@gmail.com>
devin-ai-integration
Bot
force-pushed
the
devin/1786977962-padded-transform
branch
from
August 17, 2026 16:50
822acbd to
2a6086c
Compare
GCC Code Coverage Report📂 Overall coverage
|
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
The Kinoshita–Li buffers are bivariate packings (y = x^C) whose stride-C rows are only half-occupied, i.e. zero wherever
(j mod C) >= C/2— a 2D convolution zero-padded in x. This prunes the FFTs on both sides of that structure, cutting a constant factor off the leadingn log² ntransform work (the generalization of the earlier evens-upsampletrick from b=0 to arbitrary strides).New engine primitives (documented in the
enginecontract, required by the concept):E::transform_padded(in, n, C)— transform of an input zero on the dead columns. Infft_core::forward_padded, the cross-row DIF stages (k >= C) only touch the live columns (half work), and the stage pairing(j, j+C/2)reads known zeros so it degenerates to copy+twiddle; stages below run in full. Output is the ordinary full transform, so it composes with everything else.E::finish_padded(p, out, C, op)— finish when only the live outputs are wanted;fft_core::inverse_paddedis the exact mirror (output-pruned inverse), and the dead positions ofoutare left unspecified. Valid for any product spectrum, since it's output pruning, not an input-support assumption.Implemented for ntt, real (packing pairs adjacent x's, so the row structure survives at stride
C/2in the packed buffer;C == 2falls back to the dense path), split, crt, and forwarded throughcomponentwise(matrix/trunc/stable get it for free, with the non-assignopcomposed through an element buffer as infinish).Call sites:
Tests: all-engine
transform_padded/finish_paddedequivalence against the plain transform/finish (including theadd_oppath), plus the same for the matrix/trunc/stable wrapper engines; the existing compose tests cover the series call sites.Stacked on #87 (uses
E::graeffe); base is that branch and should retarget to master once it merges.Link to Devin session: https://app.devin.ai/sessions/7d41aa62f31e4620807608a6e6afcc94
Requested by: @ecnerwala