Skip to content

Conversation

@SeungWonYang-pro
Copy link

@SeungWonYang-pro SeungWonYang-pro commented Feb 2, 2026

Related Issue

issue #295

Summary

Fixes compiler compatibility by correcting the pragma target attribute from avx2vnni to avxvnni for GCC and Clang compilers.

Problem

The target attribute name avx2vnni is incorrect. The correct name is avxvnni (AVX-VNNI instruction set extension). This typo could cause compilation errors with certain compiler versions.

Solution

Replaced all occurrences of avx2vnni with avxvnni in Sierra target pragma directives across both files.

@SeungWonYang-pro SeungWonYang-pro force-pushed the fix/sierra-avxvnni-pragma branch from b40648d to 5193189 Compare February 2, 2026 05:08
@SeungWonYang-pro SeungWonYang-pro changed the title Fix: Replace avx2vnni with avxvnni for GCC and Clang compatibility Fix: Replace avx2vnni with avxvnni for GCC compatibility Feb 2, 2026
@SeungWonYang-pro SeungWonYang-pro changed the title Fix: Replace avx2vnni with avxvnni for GCC compatibility Fix: Replace avx2vnni with avxvnni for GCC and Clang compatibility Feb 2, 2026
GCC and Clang do not recognize the  target attribute.
The correct flag for AVX-VNNI (AVX2-VNNI) instructions is .

This fix enables SIMSIMD_TARGET_SIERRA to compile successfully with
both GCC and Clang, allowing runtime dispatch to select optimal
SIERRA kernels on compatible CPUs.

Changes:
- include/simsimd/dot.h: avx2vnni -> avxvnni in pragma directives
- include/simsimd/spatial.h: avx2vnni -> avxvnni in pragma directives

Tested with:
- GCC 15.2.0
- Clang 20.1.8
@SeungWonYang-pro SeungWonYang-pro force-pushed the fix/sierra-avxvnni-pragma branch from 5193189 to 0b5df10 Compare February 2, 2026 05:15
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