Skip to content

Remove AVX-512 backend paths and improve ARM/MSVC SIMD detection#74

Merged
falseywinchnet merged 1 commit into
mainfrom
nf8q8t-main/remove-avx512-code-and-add-windows-arm64-support
Jun 28, 2026
Merged

Remove AVX-512 backend paths and improve ARM/MSVC SIMD detection#74
falseywinchnet merged 1 commit into
mainfrom
nf8q8t-main/remove-avx512-code-and-add-windows-arm64-support

Conversation

@falseywinchnet

Copy link
Copy Markdown
Owner

Motivation

  • Remove the AVX-512-specific backend and 512-bit intrinsics so the kernel supports only scalar, 128-bit (SSE2/NEON), or AVX2+FMA paths.
  • Make NEON detection and FMA detection more robust for MSVC/Windows ARM64 targets so Windows ARM64 builds pick the NEON or scalar paths correctly.
  • Simplify documentation and internal notes so they reflect the supported SIMD backends and avoid describing AVX-512 experiments.

Description

  • Stripped AVX-512 selection and all __m512 / _mm512* codepaths from src/detail/bruun_kernel.hpp, including conditional blocks that compiled 512-bit kernels.
  • Added a BRUUN_HAS_FMA probe (__FMA__ || _M_FMA) and adjusted the AVX2 level test to require BRUUN_HAS_FMA, and updated 128-bit x86 and NEON detection to consider MSVC macros (_M_IX86_FP, _M_ARM64, _M_ARM64EC, __ARM_NEON__, and __ARM_NEON).
  • Reworked conditional includes so immintrin.h and arm_neon.h are pulled only for the supported backends and guarded by the improved detection macros.
  • Updated runtime backend naming, inline comments, and supporting docs/notes (documentation/python.md, src/detail/inverse_acceleration_notes.txt, src/detail/kernel_sequentiality_flow.md) to remove or reword AVX-512 references.

Testing

  • Ran a full CMake build with auto-SIMD detection and tests via cmake -S . -B build -DBFFT_BUILD_TESTS=ON -DBFFT_BUILD_EXAMPLES=OFF && cmake --build build -j2 && ctest --test-dir build --output-on-failure, and all tests passed.
  • Ran a no-auto-SIMD build and tests via cmake -S . -B build-no-auto -DBFFT_ENABLE_AUTO_SIMD=OFF -DBFFT_BUILD_TESTS=ON -DBFFT_BUILD_EXAMPLES=OFF && cmake --build build-no-auto -j2 && ctest --test-dir build-no-auto --output-on-failure, and all tests passed.
  • Searched the source tree for AVX-512 tokens (rg -n "AVX-512|avx512|__AVX512|__m512|_mm512") and found no remaining AVX-512 occurrences.
  • Performed a clang++ -target aarch64-pc-windows-msvc -fsyntax-only attempt to validate MSVC/Windows ARM target handling, which failed in this container due to missing Windows C++ standard library headers and therefore could not fully validate MSVC system headers here.

Codex Task

@falseywinchnet falseywinchnet merged commit 2e78d82 into main Jun 28, 2026
4 checks passed
@falseywinchnet falseywinchnet deleted the nf8q8t-main/remove-avx512-code-and-add-windows-arm64-support branch July 2, 2026 18:13
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