WIP: MAINT: Modulate dispatched x86 CPU features #28896
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
As we move to Highway, our CPU feature dispatching system needs to be updated. The current hybrid approach (feature & group-based) is no longer suitable, and certain features like AMD legacy extensions and Xeon Phi support need to be removed. Additionally, since we're in 2025, it's reasonable to raise our baseline requirement to SSE4.1.
Changes
This PR implements the following modifications to the CPU feature dispatching system:
Removed individual feature dispatching for:
SSE
,SSE2
,SSSE3
) - still accessible viaSSE41
and higherXOP
,FMA4
)POPCNT
andSSE42
- now available through newSSE4_COMMON
groupAVX2
,FMA3
,F16C
,AVX
) - now available through newAVX2_COMMON
groupAVX512F
andAVX512CD
- accessible viaAVX512_SKX
and higherDropped support for:
AVX512_KNL
,AVX512_KNM
) - discontinued by IntelAVX512_CLX
andAVX512_CNL
- not supported by Highway (features available viaAVX512_ICL
)New Feature Group Hierarchy
SSE41
SSE
SSE2
SSE3
SSSE3
SSE4_COMMON
(new)SSE41
POPCNT
SSE42
AES
PCLMULQDQ
AVX2_COMMON
(new)SSE4_COMMON
AVX2
BMI
BMI2
FMA3
AVX512_SKX
AVX2_COMMON
AVX512F
AVX512CD
AVX512VL
AVX512BW
AVX512DQ
AVX512_ICL
AVX512_SKX
AVX512VBMI
AVX512VBMI2
AVX512VNNI
AVX512BITALG
AVX512VPOPCNTDQ
VAES
GFNI
VPCLMULQDQ
AVX512_SPR
AVX512_ICL
AVX512FP16