Skip to content

Remove the pruning of pass plans (nonzero, needed) - #24

Merged
tknopp merged 2 commits into
mainfrom
cleanup-pruning
Nov 10, 2026
Merged

tknopp merged 2 commits into
mainfrom
cleanup-pruning

Conversation

@tknopp

@tknopp tknopp commented Nov 10, 2026

Copy link
Copy Markdown
Member

Removes the pruning of the pass plans: the zero-input and needed-output masks that plan_pass took as
nonzero and needed. The users of the passes prune by themselves (NFFT.jl prunes by boxes of lines and
calls plan_pass(v, d; sign, threads) only), and each mask created its own codelets, so the masks cost
a type parameter, a codelet family and their tests without paying off (the gain measured for r2r was
0.94–0.99 and for in-row pruning 1–5 % of a whole transform).

Changes

  • plan_pass: the keywords nonzero and needed are gone. Breaking for code that passes them.
  • Removed: Pruning, NOPRUNE, pruning, PRUNE_MIN_ZERO, the mask parameters of the codelet and the
    stage kernels, prune_statements!, the Pr parameter and the prune field of PassPlan, and their tests.
  • The codegen no longer represents zero inputs as nothing. The generated codelets are identical to
    those before for every radix from 2 to 31 and both signs (compared statement by statement).
  • Documentation and README follow.
  • The quick test selection takes about 5 minutes with two Julia threads on a 256-thread machine.

Checks

  • Full quick selection (AMD EPYC 7702, two Julia threads): 2683 pass, 10 broken as before, 0 fail.
  • Direct DFT check of the quick selection (688 transforms, all radices, both signs): passes.
  • Timing against main on the M1, one thread, interleaved, minimum of two runs, 20 cases: 0.97–1.06.

🤖 Generated with Claude Code

tknopp and others added 2 commits November 10, 2026 11:58
NFFT.jl prunes by boxes of lines and does not use the zero-input and needed-output masks of
plan_pass. The masks went through the codelet generator (zero inputs as `nothing`, statements
without a needed output dropped), the stage kernels (Val arguments per mask), the chains
(Pruning type parameters), PassPlan (a third type parameter and a field) and the tests.

Removed: nonzero and needed of plan_pass, Pruning, NOPRUNE and PRUNE_MIN_ZERO, the mask
parameters of the codelet and the kernels, prune_statements!, and the pruned tests. The generated
codelets are identical to those before for every radix and both signs; the stage kernels keep
their range arguments, which the threads use.

Breaking for code that passes nonzero or needed to plan_pass.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@tknopp
tknopp marked this pull request as ready for review November 10, 2026 13:17
@tknopp
tknopp merged commit dc18673 into main Nov 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant