Skip to content

Remove separate sse2 and fma kernels#107

Merged
bluss merged 5 commits into
masterfrom
multiple
Jul 14, 2026
Merged

Remove separate sse2 and fma kernels#107
bluss merged 5 commits into
masterfrom
multiple

Conversation

@bluss

@bluss bluss commented Jul 13, 2026

Copy link
Copy Markdown
Owner
  • sse2 is redundant with default enabled features
  • fma is mostly redundant on practical configurations in favour of the fma,avx2 combination

This depends on the MSRV update, just for the update to const fn parsing of MMTEST_FEATURE, testing-only functionality for assigning which target features to allow.

  • MMTEST_FEATURE=avx,fma,avx2 is now allowed: multiple features, separated by comma.

bluss added 5 commits July 13, 2026 11:34
So that we can use more const fn and const generics features.
This compile time environment variable exists for testing only.
Previously it would only work with one feature name, now it takes a
comma-separated list that's parsed at compile time.

This is useful because the KernelFmaAvx2 kernel needs both features fma
and avx2 to be enabled, so it's tested by something like this:

MMTEST_FEATURE=avx,fma,avx2 cargo build ...
It has no point, as default x86 and x86-64 targets already enable sse2
unconditionally, so the fallback kernel is equivalent to the sse2
configuration, with the small difference of enforced alignment, but it
shouldn't be a difference in practice.
Keep only fma,avx2; most x86-64 that have fma in practice also have
avx2, the extra instantiation of a kernel for just fma is unnecessary code.

Do this even if for a fact "avx2" is used only in the packing function and
only "fma" in the microkernel.
@bluss bluss merged commit ea2549d into master Jul 14, 2026
17 checks passed
@bluss bluss deleted the multiple branch July 14, 2026 14:26
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