Skip to content

Add AVX2 double-precision BODFT combine (forward/inverse) and Makefile asm target#44

Merged
falseywinchnet merged 2 commits into
mainfrom
iandix-main/implement-avx2-pathway-for-odd-fft-transform
Jun 23, 2026
Merged

Add AVX2 double-precision BODFT combine (forward/inverse) and Makefile asm target#44
falseywinchnet merged 2 commits into
mainfrom
iandix-main/implement-avx2-pathway-for-odd-fft-transform

Conversation

@falseywinchnet

Copy link
Copy Markdown
Owner

Motivation

  • Provide a 256-bit AVX2/FMA double-precision combine implementation for the BODFT path to improve forward and inverse performance and eliminate a final copy in the forward pass.
  • Expose assembly emission for the new AVX2 BODFT code via make asm-check and document validation/performance notes.

Description

  • Implement AVX2 helpers and vectorized combine routines: added bodft_uzp4_pd, bodft_store4_pd, bodft_rev4_pd, bodft_combine_fwd_avx2_f64, and bodft_combine_inv_avx2_f64 in src/detail/bodft_kernel.hpp and wire them into combine_fwd/combine_inv under BRUUN_LEVEL >= 2 for double (RT size 8).
  • Change plan execution to write the final forward pass directly into the caller output buffer and simplify ping-pong buffer switching in both forward and inverse to avoid an extra final copy.
  • Add assembly target and variables to Makefile so asm-check emits src/bodft_avx2.s when AVX2 flags are enabled by introducing BODFT_AVX2_ASM and a dedicated rule.
  • Add documentation src/detail/bodft_avx2_notes.md describing the AVX2 paths, validation steps, and performance observations.

Testing

  • Ran make test BUILD_DIR=build-avx2 CXXWARNFLAGS='-Wall -Wextra -Wpedantic -Werror' which completed successfully.
  • Built and executed the BODFT benchmark with make build-avx2/examples/bodft_benchmark BUILD_DIR=build-avx2 && build-avx2/examples/bodft_benchmark to validate correctness and measure timings, which ran successfully.
  • Ran make asm-check BUILD_DIR=build-avx2 and inspected build-avx2/src/bodft_avx2.s to confirm AVX/FMA instructions were emitted as expected.

Codex Task

@falseywinchnet falseywinchnet merged commit 0235eaf into main Jun 23, 2026
4 checks passed
@falseywinchnet falseywinchnet deleted the iandix-main/implement-avx2-pathway-for-odd-fft-transform branch June 23, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant